I am getting Fatal error: Uncaught Error: Call to a member function real_query() on null with this code:
public final function Retrieve($TABLE, $CRIT){
$_query = "SELECT * FROM `{$TABLE}` WHERE ";
foreach($CRIT as $_field => $info){
$_query .= " `{$_field}` = `{$info}` &&";
}
if($this->LINK->real_query(rtrim($_query, ' &'))){
return $this->LINK->store_result();
} else{
return json_encode(array("Error"=>$this->LINK->errno(), "Description"=>$this->LINK->error()));
}
}
(LINK is my mysql_connect() result.) I have tried everything i can think of, ->query, going to mysqli_query, breaking it sown and using a $result variable, but nothing seems to work...