function fs_get_unique_hit_count_range_from_archive($site_id, $is_unix_time, $start_time, $end_time, $url_id) { if ($url_id == null) { $table = fs_archive_sites(); } else { $table = fs_archive_pages(); } return fs_get_data_count_from_archive($table, "visits", $site_id, $is_unix_time, $start_time, $end_time, $url_id); }
function fs_get_create_site_archive() { $archive_sites = fs_archive_sites(); $sql = "CREATE TABLE IF NOT EXISTS `{$archive_sites}` (\n\t\t`range_id` INT NOT NULL " . fs_comment('Range ID') . ",\n\t\t`site_id` INTEGER NOT NULL " . fs_comment('Site ID of this data') . ",\n\t\t`views` INTEGER NOT NULL " . fs_comment('Number of views in time range') . ",\n\t\t`visits` INTEGER NOT NULL " . fs_comment('Number of visits in time range') . ",\n\t\tUNIQUE `index` (`range_id`,`site_id`)\n\t\t) " . fs_comment("Archive for sites (page views and visitors per site)") . fs_engine("InnoDB"); return $sql; }
function fs_get_tables_list() { $a = array(fs_version_table(), fs_hits_table(), fs_useragents_table(), fs_urls_table(), fs_excluded_ips_table(), fs_bots_table(), fs_options_table(), fs_sites_table(), fs_archive_ranges(), fs_archive_sites(), fs_archive_pages(), fs_archive_referrers(), fs_archive_useragents(), fs_archive_countries(), fs_users_table(), fs_pending_date_table(), fs_url_metadata_table()); return $a; }