Hi, I'm making a script that goes through a very long loop (+- 30 000 loops) and in each loop it makes a mysql query. First question, is this too much of a strain on the mysql/apache server? Second question, and most important, the script selects from a table, and if the number of rows is 0 (so it does not return anything) it does something. I'm not sure if this is the correct way to do this, but is the following correct? :
$sql = "select * from ad where sitetitle='$title' and ad_username='$email'";
$result = mysql_query($sql);
if(!$rows = mysql_num_rows($result))
{
echo $title . "<br>";
}
But I get errors sometimes, something along the lines of "mysql_num_rows is not a valid mysql statement" (or something like that)