function CreateCategoryTable($category, $fulltablename = null)
 {
     $catz = new mysql_catz();
     $catz->CreateCategoryTable($category, $fulltablename);
     if ($category == "drogue") {
         $category = "drugs";
     }
     if ($category == "gambling") {
         $category = "gamble";
     }
     if ($category == "hobby/games") {
         $category = "games";
     }
     if ($category == "forum") {
         $category = "forums";
     }
     if ($category == "spywmare") {
         $category = "spyware";
     }
     if ($category == "association") {
         $category = "associations";
     }
     if ($this->EnableRemoteStatisticsAppliance == 1) {
         return;
     }
     $category = $this->category_transform_name($category);
     $tablename = strtolower("category_{$category}");
     if ($fulltablename != null) {
         $tablename = $fulltablename;
     }
     if ($tablename == "category_teans") {
         $tablename = "category_teens";
     }
     $tablename = strtolower($tablename);
     $tablename = str_replace("category_category_", "category_", $tablename);
     if ($tablename == "category_drogue") {
         $tablename = "category_drugs";
     }
     if ($tablename == "category_gambling") {
         $tablename = "category_gamble";
     }
     if ($tablename == "category_hobby_games") {
         $tablename = "category_games";
     }
     if ($tablename == "category_forum") {
         $tablename = "category_forums";
     }
     if ($tablename == "category_spywmare") {
         $tablename = "category_spyware";
     }
     if ($tablename == "category_association") {
         $tablename = "category_associations";
     }
     $tablename = strtolower($tablename);
     if ($GLOBALS["VERBOSE"]) {
         echo "CREATE CATEGORY TABLE `{$tablename}`\n";
     }
     $sql = "CREATE TABLE IF NOT EXISTS `{$this->database}`.`{$tablename}` (\n\t\t\t\t`zmd5` VARCHAR( 90 ) NOT NULL ,\n\t\t\t\t`zDate` DATETIME NOT NULL ,\n\t\t\t\t`category` VARCHAR( 20 ) NOT NULL ,\n\t\t\t\t`familysite` VARCHAR( 128 ) NULL ,\n\t\t\t\t`pattern` VARCHAR( 255 ) NOT NULL ,\n\t\t\t\t`enabled` INT( 1 ) NOT NULL DEFAULT '1',\n\t\t\t\t`uuid` VARCHAR( 255 ) NOT NULL ,\n\t\t\t\t`sended` INT( 1 ) NOT NULL DEFAULT '0',\n\t\t\t\tPRIMARY KEY ( `zmd5` ) ,\n\t\t\t\tUNIQUE KEY `pattern` (`pattern`),\n\t\t\t\tKEY `familysite` (`familysite`),\n\t\t\t\tKEY `zDate` (`zDate`),\n\t  \t\t\tKEY `enabled` (`enabled`),\n\t  \t\t\tKEY `sended` (`sended`),\n\t  \t\t\tKEY `category` (`category`)\n\t\t\t) ENGINE=MYISAM;";
     $this->QUERY_SQL($sql, $this->database);
     if (!$this->ok) {
         writelogs("Failed to create category_{$category}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
         return;
     }
     $this->QUERY_SQL("DROP TABLE webfilters_categories_caches");
     $this->create_webfilters_categories_caches();
 }