[eluser]gscharlemann[/eluser]
This worked, but it wanted me to provide a column for the company table to union with the first_name column. Is there a way to tell Mysql to insert a blank in the first_name column?
SELECT last_name AS ordered_name, first_name FROM contact WHERE user_id = 1 and deleted = 0 UNION
SELECT company_name AS ordered_name, -- NEED SECOND, BLANK COLUMN HERE -- FROM company WHERE user_id = 1 and deleted = 0 ORDER BY ordered_name, limit 0, 30
I guess I could do something like:
SELECT last_name AS ordered_name, first_name FROM contact WHERE user_id = 1 and deleted = 0 UNION
SELECT company_name AS ordered_name, company_name FROM company WHERE user_id = 1 and deleted = 0 ORDER BY ordered_name, limit 0, 30
and just ignore the second company_name. It feels cleaner to have blanks though.
Thanks for your help!