From:             BunakovM at meta dot ua
Operating system: Windows XP, SP2
PHP version:      5.2.6
PHP Bug Type:     ODBC related
Bug description:  odbc_field_len(), odbc_field_precision(), odbc_field_scale() 
- don't work

Description:
------------
The functions odbc_field_len(), odbc_field_precision(), odbc_field_scale()
- don't work corractly when use Transbace ODBC driver in "SELECT ..."
SQL-statement.

Reproduce code:
---------------
$con_str = "Driver={Transbase ODBC};Database=MyDB";
$db_conn = odbc_connect($con_str,"user","0")

$query = "SELECT * FROM Tab1";
$res = odbc_exec($db_conn, $query);
$num_fields = odbc_num_fields($res);
for($j=1; $j<=$num_fields; $j++){
  echo odbc_field_name($res,$j);
  echo '<br/>' . odbc_field_type($res,$j);
  echo '<br/>' . odbc_field_len($res,$j);
  echo '<br/>' . odbc_field_precision($res,$j);
  echo '<br/>' . odbc_field_scale($res,$j);
  echo '<br/>' . odbc_result($res,$j);
}

odbc_free_result($res);    // Free Result
odbc_close($db_conn);    // Close Connection

Expected result:
----------------
city_name
varchar
128
?
?
Kiyv

Actual result:
--------------
city_name
varchar
39806880
39770304
39805152
Kiyv

-- 
Edit bug report at http://bugs.php.net/?id=45445&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45445&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45445&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45445&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45445&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45445&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45445&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45445&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45445&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45445&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45445&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45445&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45445&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45445&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45445&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45445&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45445&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45445&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45445&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45445&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45445&r=mysqlcfg

Reply via email to