1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-27 12:05:06 +02:00

some more pdo stuff

This commit is contained in:
Andrew Dolgov 2017-12-01 10:35:22 +03:00
parent bfc54b0369
commit 8aa568b3a2

View File

@ -600,8 +600,9 @@
$profile = $profile ? $profile : null; $profile = $profile ? $profile : null;
$u_sth = $pdo->prepare("SELECT pref_name $u_sth = $pdo->prepare("SELECT pref_name
FROM ttrss_user_prefs WHERE owner_uid = ? AND profile = ?"); FROM ttrss_user_prefs WHERE owner_uid = :uid AND
$u_sth->execute([$uid, $profile]); (:profile IS NULL AND profile is NULL OR profile = :profile)");
$u_sth->execute(['uid' => $uid, 'profile' => $profile]);
$active_prefs = array(); $active_prefs = array();
@ -1966,7 +1967,7 @@
$pdo = Db::pdo(); $pdo = Db::pdo();
$sth = $pdo->prepare("SELECT id FROM ttrss_feed_categories $sth = $pdo->prepare("SELECT id FROM ttrss_feed_categories
WHERE $parent_qpart AND title = '$feed_cat' AND owner_uid = ?"); WHERE parent_cat = ? AND title = '$feed_cat' AND owner_uid = ?");
if (db_num_rows($result) == 0) { if (db_num_rows($result) == 0) {