execute(array(WT_GED_ID, WT_SCRIPT_NAME, $page_parameter))->fetchOne(); // Only record one hit per session if ($page_parameter && empty($_SESSION['SESSION_PAGE_HITS'][WT_SCRIPT_NAME.$page_parameter])) { $_SESSION['SESSION_PAGE_HITS'][WT_SCRIPT_NAME.$page_parameter]=true; if (is_null($hitCount)) { $hitCount=1; WT_DB::prepare( "INSERT INTO `##hit_counter` (gedcom_id, page_name, page_parameter, page_count) VALUES (?, ?, ?, ?)" )->execute(array(WT_GED_ID, WT_SCRIPT_NAME, $page_parameter, $hitCount)); } else { $hitCount++; WT_DB::prepare( "UPDATE `##hit_counter` SET page_count=?". " WHERE gedcom_id=? AND page_name=? AND page_parameter=?" )->execute(array($hitCount, WT_GED_ID, WT_SCRIPT_NAME, $page_parameter)); } } } else { $hitCount=1; } $hitCount="{$hitCount}"; unset($page_name, $page_parameter);