You are here

function _google_adwords_path_load_codes in Google AdWords Conversion Tracking 7.2

Internal function to load all unique codes from the database.

3 calls to _google_adwords_path_load_codes()
google_adwords_path_get_all_codes in modules/google_adwords_path/google_adwords_path.module
Get all Google Adwords unique codes after filtering for the current path.
google_adwords_path_get_path_codes in modules/google_adwords_path/google_adwords_path.module
Get all Google Adwords unique codes after filtering for the current path.
google_adwords_path_load_code_by_cid in modules/google_adwords_path/google_adwords_path.module
Function to load a conversion code by id.

File

modules/google_adwords_path/google_adwords_path.module, line 180
Module file for the Google Adwords Path Submodule.

Code

function _google_adwords_path_load_codes($cid = NULL) {
  $codes = array();
  $result = db_select('google_adwords_path', 'g')
    ->fields('g');
  if ($cid) {
    $result
      ->condition('cid', $cid);
  }
  $result = $result
    ->execute();
  while ($code = $result
    ->fetchAssoc()) {
    $codes[] = $code;
  }
  return $codes;
}