
10-27-2004, 01:42 PM
|
 |
|
|
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by darcyb
Ok, good advice Xenon, thanks! My strategy will now be to count rows, and generate a random int between 1 and max_rows, and then do a SELECT by that random ID, grabbing the quote text.
|
Hmm ... what about
PHP Code:
$quote = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "quotes ORDER BY RAND() LIMIT 1")
?
|