Skip to content

Instantly share code, notes, and snippets.

@rxu
Last active October 22, 2015 17:12
Show Gist options
  • Save rxu/fb4ca2b931e89be5db54 to your computer and use it in GitHub Desktop.
Save rxu/fb4ca2b931e89be5db54 to your computer and use it in GitHub Desktop.
statuses
$statuses_closed = array(self::STATUS_IMPLEMENTED, self::STATUS_DUPLICATE, self::STATUS_INVALID);
$statuses = array_merge($statuses_closed, array(self::STATUS_NEW, self::STATUS_PROGRESS));
$status = (in_array($status, $statuses)) ? $this->db->sql_in_set('idea_status', $status) :
(($status == -1) ? $this->db->sql_in_set('idea_status', $statuses_closed, true) : $this->db->sql_in_set('idea_status', $statuses, true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment