What constant to declare in PDO::PARAM_ to insert date (yyyy-mm-dd h::m:s) in mysql?

Asked

Viewed 171 times

1

I need to pass a date to the database. I will use the PDO class, but I have the following question. When creating "bindValue()" what kind of constant should I declare in PDO::PARAM_ ?

  • 2

    PDO::PARAM_STR that one

  • 1

    String constant ?

  • 2

    is yes to save dates in format yyyy-mm-dd h:m:s or yyyy-mm-dd in the PDO is PDO::PARAM_STR only remembering that the date has to be in the format that the bank accepts ...

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.