#33238 [Opn->Fbk]: Bug select odbc_fetch_row
| From: | sniper@php.net | Date: | Fri, 03 Jun 2005 20:59:21 +0000 |
| Subject: | #33238 [Opn->Fbk]: Bug select odbc_fetch_row | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79879@lists.php.net to get a copy of this message | ||
ID: 33238
Updated by: sniper@php.net
Reported By: olivier at pipas dot org
-Status: Open
+Status: Feedback
Bug Type: ODBC related
Operating System: Windows XP
PHP Version: 5.0.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-06-03 22:15:51] olivier at pipas dot org
I have tested with odbc_fetch_object, and it's working !
So : it's a bug in function odbc_fetch_row
------------------------------------------------------------------------
[2005-06-03 22:09:55] olivier at pipas dot org
I use apache 2 and php as an Apache module
------------------------------------------------------------------------
[2005-06-03 22:05:31] olivier at pipas dot org
Description:
------------
I do a select in a db access (odbc), it return good number of rows but
cannot show it
Reproduce code:
---------------
if(!$conn=odbc_connect("mydbodbc","user","pass"))
exit("Error connect DB");
$sql="SELECT numcountry, namecountry FROM countries;";
if(!$res=odbc_exec($conn,$sql))
exit("Error syntax : $sql");
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo "$restab[0] $restab[1]<br>\n";
$i++;
}
echo $i;
Expected result:
----------------
Array1 Belgium<br>
Array2 France<br>
Array3 Spain<br>
3
Actual result:
--------------
1 <br>
1 <br>
1 <br>
3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33238&edit=1