Page 1 of 1

how to write while !eof

Posted: Sat Jan 10, 2004 1:28 pm
by shaky
I want to retrieve data from database, how do i want to check
"while not eof"..

i'm using mysql_fetch_array($result);

Posted: Sat Jan 10, 2004 1:54 pm
by fastfingertips
Is simple

while($row=mysql_fetch_array($result))
{
$customer=$row['customer']
}

Posted: Sat Jan 10, 2004 5:34 pm
by Gen-ik
You can also get objects like this...

Code: Select all

while($obj = mysql_fetch_object($result))
{
    $customer = $obj->customer;
}