I have a SQL query:
if($stmt = $connection->prepare("INSERT INTO users(login, passwd, logged, register, last_login) VALUES(:login, :passwd, FALSE, NOW(), NULL")) {
$stmt->bindValue(':login', $login, PDO::PARAM_STR);
$stmt->bindValue(':passwd', md5($passwd), PDO::PARAM_STR);
$stmt->execute();
$stmt->close();
} else {
echo "query error <b>".$connection->error."</b><br>";
}
and it returns this error:
Connection error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':login, :passwd, FALSE, NOW(), NULL' at line 1
How can I fix it?
I am using MariaDB on Linux Fedora.