Deleting table if not exists.

@param $dbname name of database
$table => $table name

@return bool
779523
public function deleteTbl($dbname, $table)
    {
        $this->db->exec($this->query->useQuery($dbname));
        $sql = $this->query->deleteTbl($table);
        $this->db->exec($sql);

        return true;
    }
574039
public function hasTable($tableName)
    {
        $dbMetadata = Source\Factory::createSourceFromAdapter($this->db);
        $tableNames = $dbMetadata->getTableNames();

        return in_array($tableName, $tableNames);
    }
1106351
protected function tableExist($tableName)
    {
        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
        $sm = $this->dbHandler->getConnection()->getSchemaManager();
        foreach ($sm->listTables() as $table) {
            if ($table->getName() == $tableName) {
                return true;
            }
        }

        return false;
    }
1034018
public function deleteDatabase($domainName, $db)
    {
        return $this->getSoapClient(array_merge(array($domainName, $db), array('__method' => 'deleteDatabase')))->deleteDatabase($domainName, $db);
    }
86627
public function getTables($dbName='') {
        $sql    = !empty($dbName)?'SHOW TABLES FROM '.$dbName:'SHOW TABLES ';
        $result = $this->query($sql);
        $info   =   array();
        foreach ($result as $key => $val) {
            $info[$key] = current($val);
        }
        return $info;
    }
686213
public function useDatabase(string $dbName): bool
    {
        $sql = sprintf('USE %s;', $this->quoter->quoteName($dbName));
        $result = $this->db->exec($sql);

        return (bool)$result;
    }
404161
public function deleteTbl($table)
    {
        if (isset($table) && !empty(trim($table))) {
            $sql = "DROP TABLE `{$table}` ";

            return $sql;
        } else {
            return false;
        }
    }
175968
public function tableExists($tablename)
  {
    $fromdb = "";

    if ($pos = strpos($tablename, "."))
    {
      $fromdb = "from `".substr($tablename, 0, $pos)."`";
      $tablename = substr($tablename, $pos+1);
    }

    $query = "show tables $fromdb like ".$this->quote($tablename);
    $result = $this->q($query);

    $exists = mysqli_num_rows($result) != 0;
    mysqli_free_result($result);
    return $exists;
  }
1247797
public function EmptyTable($Table = '') {
      if ($Table == '') {
         if (!isset($this->_Froms[0]))
            return FALSE;

         $Table = $this->_Froms[0];
      } else {
         $Table = $this->EscapeIdentifier($this->Database->DatabasePrefix.$Table);
      }


      $Sql = $this->GetDelete($Table);
      
      return $this->Query($Sql, 'delete');
   }
15433
public function deleteTbl($table)
    {
        $sql = $this->query->deleteTbl($table);
        $this->db->exec($sql);

        return true;
    }
369699
public function hasTable($tableName)
    {
        if ($tableName instanceof Model) {
            $tableName = $tableName->tableName();
        }

        return $this->connection->getSchemaManager()->tablesExist([$tableName]);
    }
54586
public function delete()
    {
        if( !$this->tableName ) {
            throw new LogicException('No table name specified');
        }
        return $this->database->delete()
                ->table($this->tableName);
    }
37785
public static function checkTableExists(string $tableName): bool
  {
    $query = sprintf('
select 1
from   information_schema.TABLES
where table_schema = database()
and   table_name   = %s', self::$dl->quoteString($tableName));

    return !empty(self::executeSingleton0($query));
  }
875484
public function hasTable($tableName)
    {
        $tableName = $this->getFullQualifiedAssetName($tableName);

        return isset($this->_tables[$tableName]);
    }
1231329
protected function skipTable($tableName)
    {
        // Check if select options is set and table name is not selected
        if (count($this->option('select')) > 0 && !in_array($tableName, $this->option('select'), true)) {
            return true;
        }

        // Check if table name is ignored
        if (in_array($tableName, $this->option('ignore'), true)) {
            return true;
        }

        return false;
    }
966684
public static function truncate_table($table, $db = null)
	{
		return \DB::query('TRUNCATE TABLE '.\DB::quote_identifier(\DB::table_prefix($table, $db ? $db : static::$connection), $db ? $db : static::$connection), \DB::DELETE)
			->execute($db ? $db : static::$connection);
	}
1032982
public function deleteTable($tableName)
    {
        try {
            $this->db->deleteTable($tableName);
        } catch (\Exception $e) {
            throw new DbException($e->getMessage());
        }
    }