static function getStreamDirect($qry, $offset, $limit) {
- $qry .= 'ORDER BY notice.created DESC, notice.id DESC ';
+ $qry .= ' ORDER BY notice.created DESC, notice.id DESC ';
if(common_config('db','type')=='pgsql') {
- $qry .= 'LIMIT ' . $limit . ' OFFSET ' . $offset;
+ $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
} else {
- $qry .= 'LIMIT ' . $offset . ', ' . $limit;
+ $qry .= ' LIMIT ' . $offset . ', ' . $limit;
}
$notice = new Notice();
$qry =
'SELECT notice.* ' .
'FROM notice JOIN fave ON notice.id = fave.notice_id ' .
- 'WHERE fave.profile_id = %d ';
+ 'WHERE fave.user_id = %d ';
return Notice::getStream(sprintf($qry, $this->id),
'user:faves:'.$this->id,
$qry =
'SELECT notice.* ' .
'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' .
- 'WHERE subscription.subscriber = %d';
+ 'WHERE subscription.subscriber = %d ';
return Notice::getStream(sprintf($qry, $this->id),
'user:notices_with_friends:' . $this->id,