Using Mysqli bind_param with date and time columns?

Like any other string

$stmt = $mysqli->prepare('insert into foo (dt) values (?)');
$dt="2009-04-30 10:09:00";
$stmt->bind_param('s', $dt);
$stmt->execute();

Leave a Comment