Skip to content

Instantly share code, notes, and snippets.

@nickvergessen
Created February 10, 2014 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickvergessen/8914579 to your computer and use it in GitHub Desktop.
Save nickvergessen/8914579 to your computer and use it in GitHub Desktop.
$sql = 'SELECT post_id, post_visibility
FROM ' . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND post_attachment = 1";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$post_visibility[(int) $row['post_id']] = (int) $row['post_visibility'];
}
$db->sql_freeresult($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment