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(
|
->query(
|
||||||
'SELECT *
|
'SELECT *
|
||||||
FROM `INFORMATION_SCHEMA`.`COLUMNS`
|
FROM `INFORMATION_SCHEMA`.`COLUMNS`
|
||||||
WHERE `TABLE_NAME` = :table_name,
|
WHERE `TABLE_NAME` = :table_name
|
||||||
AND `COLUMN_NAME` = :column_name',
|
AND `COLUMN_NAME` = :column_name',
|
||||||
array(
|
array(
|
||||||
'table_name' => $table_to_check,
|
'table_name' => $table_to_check,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Options
|
||||||
if ($optionExists) {
|
if ($optionExists) {
|
||||||
$this->database->query(
|
$this->database->query(
|
||||||
'UPDATE `options`
|
'UPDATE `options`
|
||||||
SET `value` = :option_value,
|
SET `value` = :option_value
|
||||||
WHERE `key` = :option_key;',
|
WHERE `key` = :option_key;',
|
||||||
array(
|
array(
|
||||||
'option_value' => $value,
|
'option_value' => $value,
|
||||||
|
|
|
@ -21,7 +21,7 @@ if (isset($_POST['login'], $_POST['email'], $_POST['password'])) {
|
||||||
->query(
|
->query(
|
||||||
'UPDATE `users`
|
'UPDATE `users`
|
||||||
SET `last_login` = NOW()
|
SET `last_login` = NOW()
|
||||||
WHERE `email` = :user_email,
|
WHERE `email` = :user_email
|
||||||
AND `password` = :user_password;',
|
AND `password` = :user_password;',
|
||||||
array(
|
array(
|
||||||
'user_email' => $email,
|
'user_email' => $email,
|
||||||
|
@ -33,7 +33,7 @@ if (isset($_POST['login'], $_POST['email'], $_POST['password'])) {
|
||||||
->query(
|
->query(
|
||||||
'SELECT *
|
'SELECT *
|
||||||
FROM `users`
|
FROM `users`
|
||||||
WHERE `email` = :user_email,
|
WHERE `email` = :user_email
|
||||||
AND `password` = :user_password;',
|
AND `password` = :user_password;',
|
||||||
array(
|
array(
|
||||||
'user_email' => $email,
|
'user_email' => $email,
|
||||||
|
|
Loading…
Reference in a new issue