Closed mozart77 closed 6 years ago
Hi. Looks like a bug:
$db->insert('email_check',[ 'email' => 'test@example.org', 'dt_expired' => Medoo::raw('DATE_ADD(NOW(), INTERVAL :hours HOUR)', [':hours' => 3]) ] )
Outputs:
PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /usr/local/www/alter/.inc/Medoo.php on line 293
While debug outputs:
array(1) { [0]=> string(107) "INSERT INTO `email_check` (`email`, `dt_expired`) VALUES (:MeDoO_5_mEdOo, DATE_ADD(NOW(), INTERVAL 3 HOUR))" }
As you can see Medoo tries to substitute all params
This fixed on b80cb02
Hi. Looks like a bug:
Outputs:
While debug outputs:
As you can see Medoo tries to substitute all params