I am trying to extract all the dates from a date column in my MySQL database with the year 2003 to update them to 2004 using PHP. Here's what I tried - unsuccessfully - (to extract - haven't gotten to the update part yet):
select * from TABLE where (select extract(year from DATE COLUMN)=2003)
The SELECT EXTRACT(YEAR FROM) is from the MySQL website, but doesn't seem to work this way.
Any ideas?
select * from TABLE where (select extract(year from DATE COLUMN)=2003)
The SELECT EXTRACT(YEAR FROM) is from the MySQL website, but doesn't seem to work this way.
Any ideas?