title: Pass variable in join query in codeigniter
body: <p>I want to pass the variable <code>$mid</code> in join query at <code>join('movie_genre','movie_genre.movie_id=$mid');</code>
  it does not work.</p>
  
  <pre><code>$this-&gt;db-&gt;select('movie_details.movie_id,movie_details.title,movie_details.producer,movie_details.director,movie_details.writer,
         GROUP_CONCAT(movie_genre.genre) As genre, movie_genre.movie_id');
          $this-&gt;db-&gt;from('movie_details');
          $this-&gt;db-&gt;join('movie_genre','movie_genre.movie_id=$mid');
  
          $this-&gt;db-&gt;group_by('movie_genre.movie_id'); 
  
          $result=$this-&gt;db-&gt;get();
          return $result-&gt;row_array();
  </code></pre>