You are here

function dfp_tag_name_exists in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 plugins/export_ui/dfp_ctools_export_ui.inc \dfp_tag_name_exists()

Check if the given machinename is unique in the dfp_tags table.

1 string reference to 'dfp_tag_name_exists'
dfp_tag_form in plugins/export_ui/dfp_ctools_export_ui.inc
Form builder; Create an ad tag.

File

plugins/export_ui/dfp_ctools_export_ui.inc, line 286
A Ctools Export UI plugin for DFP ads.

Code

function dfp_tag_name_exists($machinename) {
  $select = db_select('dfp_tags', 'dt');
  $select
    ->addExpression('COUNT(*)');
  $select
    ->condition('dt.machinename', $machinename);
  return $select
    ->execute()
    ->fetchField();
}