I have data (date-stamped) in multiple tables that i would like to present ordered by time. However how the data needs to be presented depends on which table it is from. How can i check which table some data in a union is from and present it accoringly, i.e:
Code:mysql_query( "(SELECT columns FROM tableA) UNION (SELECT columns FROM tableB) ORDER BY timestamp DESC; for(all rows){ if(row is from tableA){ format like A } else{ format like B } }


LinkBack URL
About LinkBacks
Reply With Quote

