nextrecord

A

Anonymous

Guest
I allways do this:
Code:
$query = 'select some_field from some_table where some_field = some_value';
$result = mysql_query($query);

$record = mysql_fetch_array($result);
the last line will get one record from the database each time it is called and places that in an array.

you can use a loop to walk through all records like this:
Code:
while ($record = mysql_fetch_array($result))
{
    do_stuff_with_;
}

Greetz Daan
 
But if you use a form and you want to use "next" and "previous" buttons in a php-page you need to reload your page to update, and if you do that, mysql_connect and mysql_select_db variables are lost.

And if you use a frame to display buttons and other to display info, how do you send that two variables?.

Thanks.
 
Back
Top