php - Converting Query in Codeigniter format -
i have query
select l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadcreatedtime,l.organizationid ( select id leads removed='0' order id limit 40000 ) o bring together leads l on l.id = o.id order l.id
i want convert query in codeigniter format eg
$this->db->select('l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadcreatedtime,l.organizationid'); $this->db->from('leads');
im having problem in 8th line of query fetched info defined o how suppose write in ci
can u test code may help codegniter format
$this->db- >select('l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadcreatedtime,l.organizationid'); $this->db->from('(select id leads removed="0" order id limit 40000) o'); $this->db->join('leads l', 'l.id = o.id'); $this->db->order_by('l.id'); $result=$this->db->get(); $show=$result->result_array();
it not in codeigniter format in sub query help you.
enjoy code.
php mysql codeigniter
No comments:
Post a Comment