|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-17 22:47 UTC] kalowsky@php.net
[2003-07-23 22:29 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
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<---->