Using php or MySQL how can you match the results with the table it was retrieved from?Code:(select ID, title from table1 order by ID asc limit 10)
UNION
(select ID, title from table2 order by ID asc limit 10)
Printable View
Using php or MySQL how can you match the results with the table it was retrieved from?Code:(select ID, title from table1 order by ID asc limit 10)
UNION
(select ID, title from table2 order by ID asc limit 10)
solved the problem whereCode:(select ID, title,table1 AS col1from table1 order by ID asc limit 10)
UNION
(select ID, title,table2 AS col1from table2 order by ID asc limit 10)
col1is just a dummy column name.