Fix sql syntax error
This commit is contained in:
parent
81f16c7d78
commit
ce744e7278
3 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue