@@ 148-158 (lines=11) @@ | ||
145 | * @return array Custom BBCode user group ids |
|
146 | * @access public |
|
147 | */ |
|
148 | public function get_bbcode_group_data($bbcode_id) |
|
149 | { |
|
150 | $sql = 'SELECT bbcode_group |
|
151 | FROM ' . BBCODES_TABLE . ' |
|
152 | WHERE bbcode_id = ' . (int) $bbcode_id; |
|
153 | $result = $this->db->sql_query($sql); |
|
154 | $row = $this->db->sql_fetchrow($result); |
|
155 | $this->db->sql_freeresult($result); |
|
156 | ||
157 | return explode(',', $row['bbcode_group']); |
|
158 | } |
|
159 | ||
160 | /** |
|
161 | * Get the bbcode_group data from the database, |
|
@@ 305-314 (lines=10) @@ | ||
302 | * @return int The maximum value in the column |
|
303 | * @access protected |
|
304 | */ |
|
305 | protected function get_max_column_value($column) |
|
306 | { |
|
307 | $sql = 'SELECT MAX(' . $this->db->sql_escape($column) . ') AS maximum |
|
308 | FROM ' . BBCODES_TABLE; |
|
309 | $result = $this->db->sql_query($sql); |
|
310 | $maximum = $this->db->sql_fetchfield('maximum'); |
|
311 | $this->db->sql_freeresult($result); |
|
312 | ||
313 | return (int) $maximum; |
|
314 | } |
|
315 | ||
316 | /** |
|
317 | * Send a JSON response |