My code generates a random number and then I want to select the row from a result set corrosponding to that number.
I'm new to PHP & SQL and I can't find a way in the manual to select a specific row from a result resource, only mysql_fetch_array() which seems to just take the first row and then move some invisible pointer on to the next one.
My code looks like this, but surely there is a more efficent and elegant way?
Code:// Loop through results fetching the first // row until I reach the <$rndTestNo>th row for ($i = 1; $i <= $rndTestNo; $i++ ) $row = mysql_fetch_array($result);





Bookmarks