So i have a php script that i run directly from the browser and i get 2 errors:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in...
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in...
In this script i make a query to select all blogs from my blog table:
$result = $this->query("
SELECT *
FROM blogs
");
And i get their feeds! So this script takes a little bit to execute, like 40secs. In my table i have 100 blogs and whenevery i run the script i get those 2 errors.
Important to know: In case i change the query like this i wont get those errors:
$result = $this->query("
SELECT *
FROM blogs
LIMIT 0,70
");
So i am very sure that it has to do with some system admin settings. I use a shared host. So when i make operations for all 100 blogs i get errors and when i use only 70 blogs i dont.
Its like i lost the mysql conexion or something. The querys is not wrong, i printed them on the screen and checked them in phpmyadmin and they work.
One of the errors comes from here:
$result = $this->query("
SELECT *
FROM blogs_settings
");
$settings = $this->fetch_object($result);
return $settings->max_feeds;
This function is used to get the max feeds/page and i get that error, and the function has nothing wrong. I've set the max_execution_time to 120 and i dont know what else can i do.
I am very sure that lots of people got this error, and if there is somebody who knows, or guess what is the problem, i am sure that not only me will apreciate.