title: How to get Data From two Different Tables of database in Codeigniter
body: <p>Database contain two tables.
  1st table contain teacher name.and the 2nd Table contain Teacher ID and Courses Detail.
  I want to Get Teacher name from the 1st table and Teacher ID from 2nd table.
  I tried this code but didnt work</p>
  
  <pre><code> public function searchfors($id)
  {
   $s=$this-&gt;db-&gt;from('course','staff')-&gt;where('stuentid',$id)-&gt;get();
   return $s-&gt;result();
  }
  </code></pre>
  
  <p>Or anyother option.?</p>