I have a question how to do this but completely in mySQL. In PHP I would do something like this. foreach($stores as $store){ //and query the different table and let it join in an array $query = 'SELECT * FROM different_table WHERE postcode='.$store->postcode;}
I tried it already in SQL.SELECT c.id as place_id, c.title, c.city, d.postcode_from FROM data_different dINNER JOIN (SELECT id,title,city, postcode FROM data_places WHERE uid=3 AND hidden=0 AND deleted=0) cON c.postcode = d.postcode_fromORDER BY d.postcode_from ASCLIMIT 1000
But it doesn't work completely. It does join the table but only partially.Could anybody fix this?