Stores the results in a database table
@param string $table The table name
350200
private function SaveToTable($table)
    {
        $sql = Access::SqlBuilder();
        $fields = array();
        $setList = null;
        foreach ($this->Elements()->GetElements() as $element)
        {
            $this->HandleElement($table, $element, $fields, $setList);
        }
        if ($setList)
        {
            Access::Connection()->ExecuteQuery($sql->Insert($sql->Table($table, $fields), $setList));
        }
    }
364413
public function filter($table)
    {
        if (empty($this->segment) || empty($this->mapping)) {
            return;
        }

        foreach ($table->getRows() as $row) {
            $label = $row->getColumn('label');

            if (!empty($this->mapping[$label])) {
                $label = $this->mapping[$label];
                $row->setMetadata('segment', $this->segment . '==' . urlencode($label));
            }
        }
    }
686839
public function hasTable($table) {
        //$sql = $this->grammar->compileTableExists();
        $table = $this->connection->getTablePrefix() . $table;
        return count($this->connection->select(array($table))) > 0;
    }
1245806
protected function setTable($table)
    {
        $this->table = $table;
        $this->quotedTable = $this->dialect->quote($table, 'name');
        return $this;
    }
210689
public function filter($table)
    {
        if ($table instanceof Simple) {
            $this->filterSimple($table);
        } else {
            $this->filterTable($table);
        }
    }
1135333
public function loadDataContainer($table)
    {
        if (!$this->database->tableExists($table)) {
            return;
        }

        if (!isset($GLOBALS['TL_DCA'][$table]) || !isset($GLOBALS['TL_DCA'][$table]['config']['treeCache']) || !\is_array($GLOBALS['TL_DCA'][$table]['config']['treeCache'])) {
            return;
        }

        $configurations = $GLOBALS['TL_DCA'][$table]['config']['treeCache'];

        foreach ($configurations as $key => $config) {
            $this->addConfigToTreeCache($table, $key, $config);
        }
    }
479814
public function save($table=null){
		#echo PHP_EOL.PHP_EOL.__METHOD__.__LINE__.'get_class['.get_class($this).'] chr(92) ['.chr(92).']<pre>['.var_export($this->modifiedColumns , true).']</pre>'.'<br>'.PHP_EOL; 
		
		if(0 < count($this->modifiedColumns)){
			$codeDescription = $GLOBALS['CONFIG_MANAGER']->getSetting($LOAD_ID = 'ERROR', $SECTION_NAME = $this->AUDIT_CODE);
			
			$replace = array("->"); 
			$search  = array(
				chr(92), # \
			); 
			$calledClassName = str_replace($search, $replace, get_class($this) );

			$args = array(
				'client_fingerprint_pk' => 1,
				'log_message' => $codeDescription.' Modified Data in: '.$calledClassName,
				'code' => $this->AUDIT_CODE,
				'data' => json_encode($this->modifiedColumns),
			);
			$this->logChange($args);
		}
		parent::save($table);
	}
314272
protected function addColumns(Table $table)
    {
        $stmt = $this->dbh->query(sprintf('SHOW COLUMNS FROM %s', $this->getPlatform()->doQuoting($table->getName())));

        while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            $column = $this->getColumnFromRow($row, $table);
            $table->addColumn($column);
        }
    }
169957
public function dropTable($table)
    {
    	if(!$this->hasTable($table)) {
    		return hst_message('is has table');
    	}
        \Schema::connection($this->databaseName)->drop($table);
		return true;
    }
1234630
public function seeTableInDatabase($table)
    {
        $count = $this->_seeTableInDatabase($table);

        $this->assertTrue($count > 0, "No matching tables found for table '" . $table . "' in database.");
    }
1081744
public static function doesTableExist($table) {
		try {
			fw\Database::prepare("SELECT 1 FROM {$table}")->fetchOne();
			return true;
		} catch (\PDOException $ex) {
			return false;
		}
	}
402674
protected function loadCacheInformation($table = null)
    {
        $schema = $this->schema;
        $this->checkTableArgument($table);

        if (!in_array($schema, self::$fullyCachedSchemas)) {
            if ($table !== null) {
                $this->getTableConfig($table);
            } else {
                $this->getSchemaConfig();
            }
        } elseif ($table !== null) {
            // Just in case to check if table exists
            $this->getTableConfig($table);
        }
    }
409599
protected function createTable(Table $table): void
	{
		$table->addPrimaryKey('id')
			->int()
			->setAutoIncrement();
		$table->addForeignKey('groupId', PagesLinksGroupsMapper::class);
		$table->addColumn('name')
			->text();
		$table->addColumn('url')
			->varChar();
		$table->addColumn('content')
			->text()
			->setDefault(null);
		$table->addColumn('description')
			->text()
			->setDefault(null);
		$table->addColumn('image')
			->varChar()
			->setDefault(null);
		$table->addColumn('position')
			->int(3);
		$table->addColumn('visible')
			->bool()
			->setDefault(1);
		$table->addColumn('openNewWindow')
			->bool()
			->setDefault(0);
	}
288884
private function updateReferences(Table &$table) {
        $this->ignoreThis();
        foreach ($table->getBackReferences() as $array) {
            foreach ($array as $ref) {
                if (in_array($ref['refTable'], $this->getIgnore()))
                    continue;

                $refTable = new Table($ref['refTable'], $table->getConnection());
                $modelClass = self::getModelTable($ref['refTable']);
                if (!empty($modelClass)) {
                    $mapper = is_array($modelClass) ?
                            new $modelClass[count($modelClass) - 1] :
                            new $modelClass;
                    $mapper->setConnection($table->getConnection());
                    $mapper->init($refTable, $this->getIgnore());
                }
            }
        }
    }
1092956
public function truncate(string $table)
    {
        $compiler = $this->connection->schemaCompiler();

        $result = $compiler->truncate($table);

        $this->connection->command($result['sql'], $result['params']);
    }
442219
public function tableExists( $table )
    {
        $query = "SELECT name FROM sqlite_master WHERE type='table' AND name='$table'";

        $statement = $this->database->query( $query );

        return ( 0 !== count( $statement->fetchAll() ) );
    }
242966
public function resetTable($table)
    {
        $data = $this->getDumpData();

        $this->executeQuery("TRUNCATE TABLE `$table`");
        if (isset($data[$table]["_sql_"])) {
            $this->executeQuery($data[$table]["_sql_"]);
        }
    }