I have this SQL statement below
INSERT into 2011_electricity ( date, energy, daynum) VALUES (STR_TO_DATE('$date','%d%m%y'),'$energy','$num'
Is it possible to increment the date by one day AS I insert it into the database?
Or could I increment it in PHP before inserting it?
The string format in PHP prior to the MySQL statement is as follows:
190711
Which is 19th July 2011.
thanks,
Greg
Use DATE_ADD() function. So your statement would became