I have a problem with this code:
if($sql = $this->database->query("SELECT * FROM warenkorb_artikel WHERE WarenkorbID = '".$erg['WarenkorbID']."'"))
{
while($erg = $sql->fetch_assoc())
{
[...]
}
}
I am getting the error:
Fatal error: Call to a member function fetch_assoc() on a non-object in [...] on the lin where the "while($eg = $sql->fetch_assoc())" is.
Can anyone help me?