-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.0-dev
For example the following SQL query has unnecessarily high readability-complexity which sql_in_set is supposed to take away.
$sql = 'UPDATE ' . $this->notifications_table . "
|
SET notification_read = 1
|
WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
|
AND notification_time <= " . (int) $time .
|
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
|
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
|
$this->db->sql_query($sql);
|