So, i'm trying to update multiple lines with a prepared statement in PDO:
UPDATE uploads SET stored_until=:stored_until WHERE name IN (FIND_IN_SET(uploads.name, :name_list))
And i'm getting an axception
Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '5320f3c10eb41fe3ceaf65c3b457538e.txt'
I understood, that somehow some "name" from Array is counting as a Date, but i can't understand why
Colums, that used in code:
`name` VARCHAR(64) NOT NULL,
`stored_until` DATE NULL DEFAULT NULL
Here's the part, where query executes
$name_list = $json['files'];
$date = new DateTime($_GET['date']);
$date->modify("+2 weeks");
$query->execute(array("stored_until" => $date->format("Y-m-d"), "name_list" => $name_list));