I'm trying to pull back two result sets into one so that I can then display the results in an HTML table. Here's my dilemma:
I run this query and I get six matches:
SELECT contacts_215.contact_id AS contact_id, contacts_215.account_id AS account_id, contacts_215.account AS account, contacts_215.first_name AS first_name, contacts_215.last_name AS last_name, contacts_215.address AS address, contacts_215.address_2 AS address_2, contacts_215.city AS city, contacts_215.state AS state, contacts_215.zip AS zip FROM contacts_215 WHERE 1 AND contacts_215.zip=45342 LIMIT 0, 30
Then I run this query and get four matches:
SELECT accounts_215.account_id AS account_id, accounts_215.account AS account, accounts_215.address AS address, accounts_215.address_2 AS address_2, accounts_215.city AS city, accounts_215.state AS state, accounts_215.zip AS zip FROM accounts_215 WHERE accounts_215.zip=45342
I tried a few different JOIN possibilities, but basically I'm looking for ONE query that will pull back the 10 matches from both queries into one result set. Any ideas?
Thanx,
Shaun