Help with a Mysql Statement. Retrieving 5 random values excluding some based on the key
Posted on 2006-06-29
I have a MySQL Table:
questionid int unsigned not null auto_increment primary key,
question text not null
I need to retrieve a random question from the database, excluding five contained in the array $quests.
if i had
$quests = 5
$quests = 7
$quests = 13
$quests = 16
$quests = 21
I need a random questions(the text) excluding any with number keys 5,7,13,16,21.
This may seem simple but I keep getting erros in my SQL statement so please help. =)