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

1

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

    
asked by anonymous 06.01.2017 / 01:47

1 answer

2

For dates, always default, which is PDO::PARAM_STR . However, when writing a normal query, the date is sent as string .

link

    
06.01.2017 / 01:59