Welcome Guest, Not a member yet? Register   Sign In
Help With Join
#9

[eluser]Faisal Alghamdi[/eluser]
it will be easy with active record and something like this. ..

Code:
$this->db->select('*');
   $this->db->select_avg('SALARY');
   $this->db->from('main_records');   $this->db->where('main_records.approval',1);  
   $this->db->join('names', 'names.idnm = main_rs.idnm','left');
   $this->db->join('ages', 'ages.idEXPERIENCE = main_records.idEXPERIENCE','left');
   $this->db->group_by('CITY');
   $this->db->order_by('SALARY','asc');
   $q = $this->db->get();
return $q->result();

using active records is the best way in terms of debugging the code.


Messages In This Thread
Help With Join - by El Forum - 01-25-2012, 07:49 PM
Help With Join - by El Forum - 01-25-2012, 09:18 PM
Help With Join - by El Forum - 01-25-2012, 09:23 PM
Help With Join - by El Forum - 01-25-2012, 09:25 PM
Help With Join - by El Forum - 01-25-2012, 09:29 PM
Help With Join - by El Forum - 01-25-2012, 09:32 PM
Help With Join - by El Forum - 01-26-2012, 01:17 PM
Help With Join - by El Forum - 01-26-2012, 05:28 PM
Help With Join - by El Forum - 01-26-2012, 06:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB