How can i get data from 6 tables in one MySQL Query? It has to say:
SELECT * FROM users WHERE
(id exists in table "region" as "user")
AND
NOT IN (id exists in table "countries" as "user" where value = '$row['country']')
AND
NOT IN (id exists in table "states" as "user" where value = '$row['state']')
AND
NOT IN (id exists in table "cities" as "user" where value = '$row['city']')
AND
NOT IN (id exists in table "regions" as "user" where value = '$row['region']')
AND
NOT in (id exists in table "alreadyTaken" as "user" where userId = users.id AND listingId = '$row['id']')
I am completly noobies and have readed som articles about innerjoin etc., but cannot find any usefull solution for this.