@@ 287-298 (lines=12) @@ | ||
284 | * @param array $ad_locations List of template locations for this ad |
|
285 | * @return void |
|
286 | */ |
|
287 | public function insert_ad_locations($ad_id, $ad_locations) |
|
288 | { |
|
289 | $sql_ary = array(); |
|
290 | foreach ($ad_locations as $ad_location) |
|
291 | { |
|
292 | $sql_ary[] = array( |
|
293 | 'ad_id' => $ad_id, |
|
294 | 'location_id' => $ad_location, |
|
295 | ); |
|
296 | } |
|
297 | $this->db->sql_multi_insert($this->ad_locations_table, $sql_ary); |
|
298 | } |
|
299 | ||
300 | /** |
|
301 | * Delete advertisement locations |
|
@@ 414-425 (lines=12) @@ | ||
411 | * @param array $ad_groups List of groups that should not see this ad |
|
412 | * @return void |
|
413 | */ |
|
414 | protected function insert_ad_group_data($ad_id, $ad_groups) |
|
415 | { |
|
416 | $sql_ary = array(); |
|
417 | foreach ($ad_groups as $group) |
|
418 | { |
|
419 | $sql_ary[] = array( |
|
420 | 'ad_id' => $ad_id, |
|
421 | 'group_id' => $group, |
|
422 | ); |
|
423 | } |
|
424 | $this->db->sql_multi_insert($this->ad_group_table, $sql_ary); |
|
425 | } |
|
426 | ||
427 | /** |
|
428 | * Remove all rows of specified ad in ad_group table |