I made this function which works great if the table exists but if i delete the c from customer to simulate it not existing i get this error instead of my tpl page being rendered.
Notice: Error: Table 'OpenCart-Test.oc_ustomer_online' doesn't exist Error No: 1146 SELECT * FROM oc_ustomer_online in /home/justine/www/opencart-test/opencart-1.5.5.1/upload/system/database/mysql.php on line 50
Code: Select all
public function CheckCustomer(){
$query = $this->db->query('SELECT * FROM '.DB_PREFIX.'customer_online');
return $query->row;
}
Thanx
Justine
This fixed it in my controller file.
Code: Select all
$this->data['checkcustomer'] = @mysql_query ('SELECT * FROM '.DB_PREFIX.'customer_online');