Well, PHP throws this error at me (in the log) when I run the code mentioned below:
Error
mysql_num_rows () expects parameter 1 to be a resource, the line specified in (place) on line 10
Line 9-11
$queryFP = ("SELECT * FROM db"); $countFP = mysql_num_rows($queryFP); $aID = rand(1, $countFP);
I think this has something to do with the $ queryFP syntax, but I'm not quite sure how to fix it, since the $ queryFP syntax is the simplest query I've ever seen.
source share