To those of you having a hard time finding the MySQLQuiz, please
give the folks at Facebook a little more time to get it into
their search. Sorry, I should have submitted a few days before
the previous post to make sure that the MySQL
Quiz was easy to find.
In the previous post, a very simple Facebook application was
shown.
The next part of the MySQL Quiz application was to randomly pick
unique questions from the database of quiz
questions.
The first step was to get the number of questions in a rapidly
expanding database. I will keep the PHP fairly simple :
$result = mysql_query("SELECT count(*) FROM fb.quiz");
$row = mysql_fetch_array($result);
$randomMax = $row[0];
Next was creating an array to hold the randomly picked, unique
id numbers. The quiz uses …