#33238 [Opn]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
 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 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





-- 
Edit this bug report at http://bugs.php.net/?id=33238edit=1


#33238 [Opn]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
 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 have tested with odbc_fetch_object, and it's working ! 

So : it's a bug in function odbc_fetch_row


Previous Comments:


[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 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





-- 
Edit this bug report at http://bugs.php.net/?id=33238edit=1