i am trying to create a MySQL query, and am wondering if anyone could help me get started....
SCENARIO>>
I have one database with two, identical structures:
table1
table1.id
table1.content
table1.last_update
table2
table2.id
table2.content
table2.last_update
i want to synchronize these two tables together, depending on the last_update field.
so... i want to compare all matches of table1.id to table2.id AND
if table1.last_update has a NEWER date, i want the table1.content field to REPLACE/UPDATE the table2.content field
AND
if table2.last_update has a NEWER date, i want the table2.content field to REPLACE/UPDATE the table1.content field
might you have any suggestions? do i need two different queries for this? or any subqueries?
thanks in advance!
🙂 jp