Fix sql syntax error

This commit is contained in:
grandeljay 2023-01-28 15:25:19 +01:00
parent 81f16c7d78
commit ce744e7278
3 changed files with 4 additions and 4 deletions

View file

@ -97,7 +97,7 @@ class Database
->query(
'SELECT *
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_NAME` = :table_name,
WHERE `TABLE_NAME` = :table_name
AND `COLUMN_NAME` = :column_name',
array(
'table_name' => $table_to_check,

View file

@ -60,7 +60,7 @@ class Options
if ($optionExists) {
$this->database->query(
'UPDATE `options`
SET `value` = :option_value,
SET `value` = :option_value
WHERE `key` = :option_key;',
array(
'option_value' => $value,

View file

@ -21,7 +21,7 @@ if (isset($_POST['login'], $_POST['email'], $_POST['password'])) {
->query(
'UPDATE `users`
SET `last_login` = NOW()
WHERE `email` = :user_email,
WHERE `email` = :user_email
AND `password` = :user_password;',
array(
'user_email' => $email,
@ -33,7 +33,7 @@ if (isset($_POST['login'], $_POST['email'], $_POST['password'])) {
->query(
'SELECT *
FROM `users`
WHERE `email` = :user_email,
WHERE `email` = :user_email
AND `password` = :user_password;',
array(
'user_email' => $email,