Posted by scotty on 01/08/07 13:27
Can someone help is there a way to get a single record from an array
The following code displays all the records. I want to display the first
record only then go to next page and display the second record and
either go to next page and display the third record or go back to the
first record again.
$query = mysql_query("SELECT * FROM table_name");
while($data = mysql_fetch_array($query))
{
$firstname = $data["firstname"];
$lastname = $data["lastname"];
$phone = $data["phone"];
echo("$firstname $lastname number is $phone");
}
Thanks in advance
Navigation:
[Reply to this message]
|