Welcome Guest, Not a member yet? Register   Sign In
SQL string to query builder of Codeigniter
#2

Try this code,


PHP Code:
$this->db->select("contact.*, IF( play_date < CURDATE() , 1, 0 ) playdate, DATE_FORMAT(game_date, '%d/%m/%Y') game_date, status,(TO_DAYS(match_date) - TO_DAYS(CURDATE())) match_in_days, (select coachname FROM coaches WHERE coach_id = contact.assigned_to_coach_id) coachname"false)
->
join('contact_status''contact_status.status_id = contact.status_id''inner')
->
where(array('contact.status<>' => 'inactive'))
->
having('followup_in_days < 0');
$this->db->where_in('id'$id_array);
$this->db->limit(550);
$query $this->db->get('contact'); 
Passionate PHP Programmer & Codeigniter Developer :- Always happy to help you!
Reply


Messages In This Thread
RE: SQL string to query builder of Codeigniter - by techbat - 06-04-2015, 09:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB