Hi.
I am having some problems with some non-normalised tables (that I cannot do anything about). Basically, there is some data stored in 'table1' with a timestamp 'Date_Entered' this can be updated, but the update time is stored in a second table containing the ID of the data in table1 that was updated, the user to update it, and the timestamp it was updated.
I need to get the data from 'table1' and order it by timestamp. HOWEVER, if the corresponding time field in 'table2' is higher (it has been edited) the newest date must be used instead.
table1
ID
Date_Entered
Name
Email
table2
Edit_ID
Edit_Time
Edit_User
I hope you understand what I need to do, basically I need to order table1 from the most recent date from table 1 or 2.
Is this possible using a query (mySQL) or will I need to use a number of queries and sort them using code (PHP)?
Thank you for your time!
K.