Easiest way to run that is to use sql joins..
your sql query would look like this (if i'm getting the question right):
Code:
SELECT DISTINCT a.name, b.name, c.name
FROM tableA as a, tableB as b, tableC as c
WHERE a.name=b.name AND c.name=a.name
the a. represents a table .. so tableA as a is the pointer to which table you want to select the field from.
the above AND statement will get you the same output from each table (tableA, tableB, tableC) but you dont have to run your AND statement on selected fields..the selected fields are only those you wish to display or manipulate further in the script. So it is done like this:
Code:
SELECT DISTINCT a.name, b.name, c.name
FROM tableA as a, tableB as b, tableC as c
WHERE a.state='Queensland'
AND b.postcode='6000'
AND c.areacode='08'
Anyways, hope that helps a bit - am sick as a dog and not sure i'm making any sense.
cheers
Bookmarks