@@ 246-257 (lines=12) @@ | ||
243 | * @param array $user_ids User IDs |
|
244 | * @return void |
|
245 | */ |
|
246 | public function remove_ad_owner(array $user_ids) |
|
247 | { |
|
248 | if (empty($user_ids)) |
|
249 | { |
|
250 | return; |
|
251 | } |
|
252 | ||
253 | $sql = 'UPDATE ' . $this->ads_table . ' |
|
254 | SET ad_owner = 0 |
|
255 | WHERE ' . $this->db->sql_in_set('ad_owner', $user_ids); |
|
256 | $this->db->sql_query($sql); |
|
257 | } |
|
258 | ||
259 | /** |
|
260 | * Get all locations for specified advertisement |
|
@@ 153-162 (lines=10) @@ | ||
150 | * @param array $ad_ids IDs of ads to increment views |
|
151 | * @return void |
|
152 | */ |
|
153 | public function increment_ads_views($ad_ids) |
|
154 | { |
|
155 | if (!empty($ad_ids)) |
|
156 | { |
|
157 | $sql = 'UPDATE ' . $this->ads_table . ' |
|
158 | SET ad_views = ad_views + 1 |
|
159 | WHERE ' . $this->db->sql_in_set('ad_id', $ad_ids); |
|
160 | $this->db->sql_query($sql); |
|
161 | } |
|
162 | } |
|
163 | ||
164 | /** |
|
165 | * Increment clicks for specified ad |