I’m doing a UNION ALL on two different tables. the query works great but I need to set an extra column called tab that is either 1 or 2 telling from which table.
example query:
SELECT * FROM news
UNION ALL
SELECT * FROM highlight
in my php code I will do $row[‘tab’]==1 then its news..
1 Answer