Guest User

Untitled

a guest
Jul 13th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. $query = array(
  2. 'SELECT' => 't.forum_id, t.id, t.last_post',
  3. 'FROM' => 'topics AS t',
  4. 'JOINS' =>
  5. array(
  6. array('INNER JOIN' => 'forums AS f',
  7. 'ON' => 'f.id=t.forum_id'),
  8. array('LEFT JOIN' => 'forum_perms AS fp',
  9. 'ON' => '(fp.forum_id=f.id AND fp.group_id=' . $forum_user['g_id'] . ')')
  10. ),
  11. 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.last_post>' . $forum_user['last_visit'] .' AND t.moved_to IS NULL');
Add Comment
Please, Sign In to add comment