title: SQL multiple join with where clause IN implode
body: <p>I have this sql query</p>
  
  <pre><code>$pole = array();
  $pole[] = "test1";
  $pole[] = "test2";
  
  $pocet_k = count($pole);
  
      $query = "Select * from kategorie join recepty on recepty.kategorie_idkategorie=kategorie.idkategorie join druhy on druhy.iddruhy = recepty.druhy_iddruhy join recepty2suroviny on recepty_idrecepty=idrecepty join suroviny on idsuroviny=suroviny_idsuroviny WHERE suroviny.nazev_suroviny  IN (".implode(",", array_map("mysql_real_escape_string", $pole)).") group by idrecepty having count(*)"."="."'$pocet_k'"." "."and druhy.iddruhy=recepty.druhy_iddruhy 
      order by recepty.nazev_receptu";
  </code></pre>
  
  <p>I am getting error <code>Unknown column 'test1' in 'where clause'</code> I don't know how to solve it :-/</p>