X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FDatabase.class.php;h=d8b6385988265a2238c79f427a2b93ccbf715044;hb=529db4861d0b54fbd4f80765684eb343b97241cf;hp=d7e9fc11592213a763f3b2d0ea8ffadf2f0d3a25;hpb=5cfafc6110985236d9f212533faee79e460bf20d;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index d7e9fc11..d8b63859 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -194,10 +194,10 @@ class Database { $config = $this->getConfigUser($userId); 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 { - $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); @@ -337,7 +337,7 @@ class Database { public function retrieveEntriesByTag($tag_id) { $sql = - "SELECT * FROM entries + "SELECT entries.* FROM entries LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id WHERE tags_entries.tag_id = ?"; $query = $this->executeQuery($sql, array($tag_id)); @@ -348,7 +348,7 @@ class Database { public function retrieveTagsByEntry($entry_id) { $sql = - "SELECT * FROM tags + "SELECT tags.* FROM tags LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id WHERE tags_entries.entry_id = ?"; $query = $this->executeQuery($sql, array($entry_id));