SV: [PHP-DB] Random Select Query

From: Date: Wed, 07 Nov 2001 13:35:41 +0000
Subject: SV: [PHP-DB] Random Select Query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14088@lists.php.net to get a copy of this message
select * from <table> order by rand() limit 4; -----Ursprungligt meddelande----- Från: Peter Allum [mailto:develop@connectu.co.uk] Skickat: den 7 november 2001 14:33 Till: php-db@lists.php.net Ämne: [PHP-DB] Random Select Query Hi there, I am building a website to run tests for people I have a question bank of about 1000, split into 10 categories, Every time the test is taken I would like to randomly select 4 questions from each category. The site is being built using PHP4 & Mysql running on Apache. It is really just the query that I run I need help on though. Thank you in advance for your help. Regards, Peter Allum -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#14088) next »