Welcome Guest, Not a member yet? Register   Sign In
Join Logic
#6

[eluser]weboap[/eluser]
looks to me like you will be doing like

Code:
public function get_events($user_id)
{
  $query = $this->db->select('users_colleges.*', FALSE)
               ->select('events.*', FALSE)
                ->join('events', 'events.college_id = users_colleges.college_id' )
                ->where('users_colleges.user_id', $user_id)
                ->get('users_colleges');

  if ($query->num_rows() > 0) return $query->result_array();

  return FALSE;
}


change events.user_id to events.author_id


Messages In This Thread
Join Logic - by El Forum - 05-23-2012, 02:24 PM
Join Logic - by El Forum - 05-23-2012, 03:36 PM
Join Logic - by El Forum - 05-23-2012, 03:37 PM
Join Logic - by El Forum - 05-23-2012, 04:00 PM
Join Logic - by El Forum - 05-23-2012, 05:46 PM
Join Logic - by El Forum - 05-23-2012, 06:32 PM
Join Logic - by El Forum - 05-23-2012, 06:45 PM
Join Logic - by El Forum - 05-23-2012, 07:05 PM
Join Logic - by El Forum - 05-23-2012, 07:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB