php - Using DATE ADD with INSERT prepared statement -


I would like to know that if possible and / or sensible to use DATE_ADD with a prepared statement in PHP. I have several variables which I am passing to PHP, which I want to insert, a SQL format is Datam, and the other is from the same time period but I want to add it several days. The number of days is also held in a variable passed in PHP. Even my query is so far

  $ mySql = "Include delay (delaybook id, delayed EDED, delayed 1, delayed DDC, delayed user ID, delayed) VALUE (? ,?, DATE_ADD (?,? DAY),?,?, NOW ()) ";  

To clarify: My bound to the absolute

  $ stmt-> gt; Bind_param ('ssssss', $ bookID, $ edd0, $ edd1, $ xD4 book, $ Ddc, $ userID);   

">

You can use the DATE_ADD in the INSERT statement, however, you enter the key code INTERVAL in the DATE_ADD Remember

should be DATE_ADD (?, INTERVAL? DAY)


Comments