odbc_fetch_row()
| From: | Scott Fletcher | Date: | Fri, 20 Sep 2002 16:00:48 +0000 |
| Subject: | odbc_fetch_row() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117035@lists.php.net to get a copy of this message | ||
Hi Fellas!
I'm a little bit confused as to why does this not work right! It had to do
with the odbc_fetch_row() function. When there is two or more rows, the
odbc_fetch_row() return a True. When there's no row, the odbc_fetch_row()
return a False. What so odd about it is when there is one row,
odbc_fetch_row() return a False. It should return a True. This doesn't
make sense. Is this a bug? Have anyone encountered this problem?? What is
the workaround to it?
Thanks!
--clip--
$cid = odbc_connect('blah blah');
$ask7 = "SELECT * FROM INQUIRIES";
$R7 = odbc_exec($cid,$ask7);
$result = odbc_result($R7,1);
while (odbc_fetch_row($R7))
{
odbc_fetch_into($R7,$inquiry,$inq_c);
echo $inquiry[0], $inquiry[1];
}
--cilp--