Date: 08/31/01
- Next message: Jeff Oien: "RE: [PHP-DB] Previous | Next (Again)"
- Previous message: Jeremy Bettis: "[PHP-DB] Who is the interbase maintainer?"
- Next in thread: Chris Hobbs: "Re: [PHP-DB] Random"
- Reply: Chris Hobbs: "Re: [PHP-DB] Random"
- Reply: Seb Frost: "RE: [PHP-DB] Random"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I would like to get the first 5 random entries out of my "mysql" database,
what would be the correct SELECT option?
I adjusted this line
$result = mysql_db_query ("$DBName","select * from Contacts LIMIT 0,5 ");
which works correctly. :)
$result = mysql_db_query ("$DBName","select * from Contacts order by rand()
LIMIT 5 ");
Doesn't work at all. :(
Can anyone through any light on this subject.
Thanks.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Oien: "RE: [PHP-DB] Previous | Next (Again)"
- Previous message: Jeremy Bettis: "[PHP-DB] Who is the interbase maintainer?"
- Next in thread: Chris Hobbs: "Re: [PHP-DB] Random"
- Reply: Chris Hobbs: "Re: [PHP-DB] Random"
- Reply: Seb Frost: "RE: [PHP-DB] Random"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

