i have the following query:
$timecheck = $db->query("SELECT (B <= NOW()) AS var FROM table1 WHERE x='$x'");
while ($row = $db->fetch_object()){
if ($row->var != 0){
$updatestatus = $db->query("UPDATE table2 SET abc='1' WHERE x='$x'");
}
}
and get the following errormessage:
Fatal error: Call to undefined method mysqli::fetch_object()
that relates to this line:
while ($row = $db->fetch_object()){
i also was trying to use:
while ($row = $db->fetch_object($timecheck)){
without any success. So in the manual is nothing written about how to use an alias by fetch-method.
it would be great if there is someone who could tell me what am i doing wrong. thanks a lot.