All,
I have code that executes fine when run through a browser and yet when run as a Cron Job produces this error:
Call to a member function query() on a non-object
The error is in this: $result2 = $mysqli->query($query) or die($mysqli->error.LINE);
from the following
set_include_path('/home/user/includes/');
include("base2.php");
$query="SELECT content_id, title, source_image, url FROM detail where approved='y'";
$result2 = $mysqli->query($query) or die($mysqli->error.__LINE__);
What causes this to behave differently?
Thanks,
G