#33238 [Opn]: Bug select odbc_fetch_row
| From: | olivier at pipas dot org | Date: | Fri, 03 Jun 2005 20:09:56 +0000 |
| Subject: | #33238 [Opn]: Bug select odbc_fetch_row | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79876@lists.php.net to get a copy of this message | ||
ID: 33238
User updated by: olivier at pipas dot org
Reported By: olivier at pipas dot org
Status: Open
Bug Type: ODBC related
Operating System: Windows XP
PHP Version: 5.0.4
New Comment:
I use apache 2 and php as an Apache module
Previous Comments:
------------------------------------------------------------------------
[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