Call to undefined function CAST() |
Hi! Im having an error in using the cast function in my model. Does cast() works in codeigniter?
Here is my code. public function gen_report($personnel, $ym) { //print_r($personnel);exit(); if($personnel != null){ $query = $this->db->select('*') ->join('document_activity b', 'b.document_id = a.id') ->join('personnel c', 'c.id = b.receiver_personnel_id') ->join('document_type d', 'd.doctype_id = a.document_type_id') ->like('a.date_received', $ym) ->CAST('a.tracking_no AS UNSIGNED') ->order_by('date_received', 'ASC') ->where('b.receiver_personnel_id',$personnel) ->get('document a'); }else{ $query = $this->db->select('*') ->join('document_activity b', 'b.document_id = a.id') ->join('personnel c', 'c.id = b.receiver_personnel_id') ->join('document_type d', 'd.doctype_id = a.document_type_id') ->like('a.date_received', $ym) ->CAST('a.tracking_no AS UNSIGNED') ->order_by('date_received', 'ASC') ->get('document a'); } if($query->num_rows() > 0){ return $query->result(); }else{ return false; } } |
Messages In This Thread |
Call to undefined function CAST() - by Qiáo yī sī - 04-01-2019, 07:44 PM
RE: Call to undefined function CAST() - by kilishan - 04-01-2019, 07:49 PM
RE: Call to undefined function CAST() - by Qiáo yī sī - 04-01-2019, 09:33 PM
RE: Call to undefined function CAST() - by ciadmin - 04-01-2019, 10:16 PM
RE: Call to undefined function CAST() - by kilishan - 04-02-2019, 06:15 AM
|