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:$pass$host";
$type=main;
$connection=odbc_connect($host,"","");
$query="select a,b,d from $type";

$result=odbc_do($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 [url]http://bugs.php.net/?id=24697&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=24697&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=24697&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=24697&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=24697&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=24697&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=24697&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=24697&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=24697&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=24697&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=24697&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=24697&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=24697&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=24697&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=24697&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=24697&r=gnused[/url]