public function add_table($tablename = null, $table_structure = null)
    {
        if (empty($tablename) || empty($table_structure)) return false;

        if (!is_string($table_structure))
            $table_structure_str = join(',', self::build_fields_array( $table_structure ) );
        else
            $table_structure_str = $table_structure;
        if (!self::table_exists($tablename)) {
            $query = "CREATE TABLE $tablename ($table_structure_str);";
    /*
            $results = $this->db->queryExec($query, $err);
            if ($err) trigger_error( "Can not create table '$tablename' [$err]!", E_USER_ERROR );
    */
            $results = $this->query($query, null, 'queryExec');
            $this->addCachedQuery( $query, $results );
        }
        return self::table_exists($tablename);
    }