From: tty3000 at hotmail dot com
Operating system: win 2000
PHP version: 4.3.2
PHP Bug Type: ODBC related
Bug description: odbc can not return accurate result when we handle excel file use
odbc
Description:
------------
odbc can not return accurate result when we handle excel file use odbc.
In excel file,we handle "NUMBER" nor "VARCHAR" ,this question appear.
we find ,this question appear when "0878-13420987" or "0878_13420987".
Reproduce code:
---------------
$user = '';
$pass = '';
$host = 'customerxls';
$phptype='odbc';
//database name in excel
file��[main],[con_data],[con_person],[detail_data]
$dsn = "$phptype://$user:[EMAIL PROTECTED]";
$type=main;
[EMAIL PROTECTED]($host,"","");
$query="select a,b,d from $type";
[EMAIL PROTECTED]($connection,$query);
$query_count="select count(*) from $type";
echo "<br>".$query."<br>";
$col=count($title_array);
for($i=0;$i<$col;$i++)
echo $title_array[$i]."\t";
echo "<br>";
while (@odbc_fetch_row($result)){
echo
odbc_result($result,a)."<---->".odbc_result($result,b)."<---->".odbc_result($result,y)."<br>";
//echo $row[0]."<br>";
}
Expected result:
----------------
1.0<---->China<---->3395
2.0<---->China<---->13308
2.0<---->China<---->
Actual result:
--------------
1.0<---->China<---->3395
2.0<---->China<---->13308
3.0<---->China<---->
--
Edit bug report at http://bugs.php.net/?id=24697&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24697&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24697&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24697&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24697&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24697&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24697&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24697&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24697&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24697&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24697&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24697&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24697&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24697&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24697&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24697&r=gnused