src/Mysql.php
public function getTableColumns() : array
    {
        if (!$this->isTableNameSet()) {
            return [];
        }
        
        $sql = "SHOW COLUMNS FROM `".$this->tableName."`";
        $stmt = $this->db->query($sql);
        $arrResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $arrResult;
    }
public function getTableColumns() : array
    {
        if (!$this->isTableNameSet()) {
            return [];
        }
        
        $sql = "SHOW COLUMNS FROM `".$this->tableName."`";
        $stmt = $this->db->query($sql);
        $arrResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $arrResult;
    }
public function getTableColumns ( ) : array { if ( ! $ this -> isTableNameSet ( ) ) { return [ ] ; } $ sql = "SHOW COLUMNS FROM `" . $ this -> tableName . "`" ; $ stmt = $ this -> db -> query ( $ sql ) ; $ arrResult = $ stmt -> fetchAll ( PDO :: FETCH_ASSOC ) ; return $ arrResult ; }
Returns Columns in table
@return array
Returns Columns in table