MySQL Forums
Forum List  »  PHP

Re: Search Query
Posted by: Peter Brawley
Date: August 31, 2010 10:52AM

Quote

(SELECT * FROM donations)
UNION ALL
(SELECT * FROM single)
UNION ALL
(SELECT * FROM shoes)
UNION ALL
(SELECT * FROM groupForm)
ORDER BY postingTitle;

Only if the four tables are union-compatible, ie close-to-identical in structure, but if they are, then you should very likely have one table with one column indicating "type" or whatever property distinguishes your current four tables.

PB

Options: ReplyQuote


Subject
Written By
Posted
August 30, 2010 06:31PM
August 31, 2010 12:43AM
August 31, 2010 06:10AM
August 31, 2010 08:48AM
August 31, 2010 10:45AM
Re: Search Query
August 31, 2010 10:52AM
August 31, 2010 07:32PM
September 01, 2010 11:11AM
September 01, 2010 11:35AM
September 01, 2010 12:40PM
September 01, 2010 02:14PM
September 01, 2010 02:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.