SELECT * FROM table ORDER BY rand() LIMIT 1;
----- Original Message -----
From: "Philip J. Newman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 10:37 PM
Subject: [PHP] Picking a random record from a database.
I have a database of Jokes.
I have 30 Jokes
I would like (each time the page is loaded) to have a random Joke appear.
Can anyone help.
Philip J. Newman
Philip's Domain - Internet Project.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php