php - Codeigniter Fatal Error Call to a member function result() on boolean -
i have been having problem query
results in following error
php fatal error: call member function result() on boolean on line 200
i'v had no problems other queries
, on 1 have query
within query
, following:
$this->load->helper('date'); $datestring = "%y-%m-%d"; $time = strtotime('yesterday'); $date= mdate($datestring, $time); $db = $this->load->database('macs', true); $query = $db->query("select temp1.user packer, count(temp1.[order]) orders (select audit.user, audit.[order] audit audit.date > '$date' , (audit.type='i11' or audit.type =' 11') group audit.date, audit.type, audit.user, audit.[order]) temp1 group temp1.user order count(temp1.[order]) desc"); return $query->result(); $macsdb->close();
this works correctly in access (the above conversion of access query). query
starts work (incorrectly however) when referencing user
is removed , works when user
replaced field such company. causing query not working user
?
i ran query without putting return , got syntax error. problem regarding user
had become [user]
Comments
Post a Comment