1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-23 17:42:15 -05:00

[fix] bug with queries when postgresql is used

This commit is contained in:
Nicolas Lœuillet 2013-12-23 11:23:12 +01:00
parent 1151e9cc8f
commit da5fc42f61

View File

@ -194,10 +194,10 @@ class Database {
$config = $this->getConfigUser($userId); $config = $this->getConfigUser($userId);
if (!isset ($user_config[$key])) { if (!isset ($user_config[$key])) {
$sql = "INSERT INTO users_config (`value`, `user_id`, `name`) VALUES (?, ?, ?)"; $sql = "INSERT INTO users_config (value, user_id, name) VALUES (?, ?, ?)";
} }
else { else {
$sql = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?"; $sql = "UPDATE users_config SET value=? WHERE user_id=? AND name=?";
} }
$params = array($value, $userId, $key); $params = array($value, $userId, $key);