thechrisproject
Programmer
I'm just trying to do a simple update query. I have two tables, one called Entries and the other called EntryUnits. Right now, both of them have a datetime column called dateAdded. Entries' primary key is entry_id. EntryUnits has a column entry_id that references the Entry.
Okay, so I want to update all the dateAdded columns in Entries with the dates from the corresponding columns in EntryUnits.
This is the query I wrote:
update Entries,EntryUnits set Entries.dateAdded=EntryUnits.dateAdded where Entries.entry_id=EntryUnits.entry_id
This results in ERROR 1064: You have an error in your SQL syntax...
What am I doing wrong here?
Okay, so I want to update all the dateAdded columns in Entries with the dates from the corresponding columns in EntryUnits.
This is the query I wrote:
update Entries,EntryUnits set Entries.dateAdded=EntryUnits.dateAdded where Entries.entry_id=EntryUnits.entry_id
This results in ERROR 1064: You have an error in your SQL syntax...
What am I doing wrong here?