date math with prepared statements
I want to add a record to a table with an expire date that is set at runtime. If I do a normal update statement, the following code works fine
But when I use this with a prepared statement in a bind_param, I get an "Incorrect datetime value".
update t1 set expiredate = now() + INTERVAL 120 DAY
How should this be formatted for use with a prepared statement if the '120' is assigned at runtime? Also, I would prefer to use the MySQL server date as the base. Thanks