Tony Thomas <[EMAIL PROTECTED]> wrote: > I have two tables that are similar, but not related. One is for > meetings and the other for training. I'd like to run a query to select > data from both based on the date so I can display the information on a > web page. Is that possible? It seems unnecessary to run a separate > query for each. I'd like to do something like this: > > SELECT * FROM meetings, trainings > WHERE (meet_date >= CURDATE()) AND (train_date >= CURDATE()) > ORDER BY meet_date DESC, train_date DESC; >
It gives you Cartesian product of two tables. > But this doesn't work. Is something like this possible? Probably you need UNION: http://www.mysql.com/doc/en/UNION.html > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]