Tuesday 8 October 2013

How to fetch data from two tables in mysql (Codeignitor)?

How to fetch data from two tables in mysql (Codeignitor)?








$query = $this ->db->query("SELECT * FROM Table-1 WHERE id = (SELECT qid FROM Table-2  where post_status ='active' AND post_type= 'quick') ");
return $query->result_array();

Please like n share if this is helpful !!!

No comments:

Post a Comment