0) { $limit_qpart = "LIMIT $limit OFFSET $offset"; } else { $limit_qpart = ""; } $result = db_query("SELECT id, title, (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries WHERE feed_id = ttrss_feeds.id AND unread = true AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') AS unread FROM ttrss_feeds WHERE ttrss_feeds.owner_uid = '$owner_uid' ORDER BY $order_by $limit_qpart"); if (!$offset) print '
$content
"; print " "; print ""; print "