Codes here !

Moderators: egami, macek, gesf

Post Reply

Mon Aug 12, 2002 12:00 am

I allways do this:

Code: Select all

$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: Select all

while ($record = mysql_fetch_array($result))

Greetz Daan


Mon Nov 11, 2002 8:54 am

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?.


Post Reply