function create_tables($TimeCache) { REALTIME_RTTH($TimeCache); REALTIME_squidhour($TimeCache); REALTIME_cachehour($TimeCache); REALTIME_sizehour($TimeCache); REALTIME_youtubehours($TimeCache); REALTIME_quotatemp($TimeCache); REALTIME_searchwords($TimeCache); return true; }
function parse_sql_commands_create_table($tablename) { events("Checking table {$tablename}"); if (preg_match("#searchwords_(.+)#", $tablename, $re)) { events("Creating table searchwords_{$re[1]}"); REALTIME_searchwords($re[1]); return; } if (preg_match("#quotatemp_(.+)#", $tablename, $re)) { events("Creating table quotatemp_{$re[1]}"); REALTIME_quotatemp($re[1]); } if (preg_match("#RTTH_(.+)#", $tablename, $re)) { events("Creating table RTTH_{$re[1]}"); REALTIME_RTTH($re[1]); } if (preg_match("#squidhour_(.+)#", $tablename, $re)) { events("Creating table squidhour_{$re[1]}"); REALTIME_squidhour($re[1]); } if (preg_match("#sizehour_(.+)#", $tablename, $re)) { events("Creating table sizehour_{$re[1]}"); REALTIME_sizehour($re[1]); } if (preg_match("#cachehour_(.+)#", $tablename, $re)) { events("Creating table cachehour_{$re[1]}"); REALTIME_cachehour($re[1]); } if (preg_match("#youtubehours_(.+)#", $tablename, $re)) { events("Creating table youtubehours_{$re[1]}"); REALTIME_youtubehours($re[1]); } }