lib/SqlException.php
public function getSqlState(): string
    {
        if (isset($this->errors[0]['sqlstate'])) {
            return $this->errors[0]['sqlstate']; // MySQL
        } elseif (isset($this->errors[0]['SQLSTATE'])) {
            return $this->errors[0]['SQLSTATE']; // SQL Server
        } else {
            return '';
        }
    }
public function getSqlState(): string
    {
        if (isset($this->errors[0]['sqlstate'])) {
            return $this->errors[0]['sqlstate']; // MySQL
        } elseif (isset($this->errors[0]['SQLSTATE'])) {
            return $this->errors[0]['SQLSTATE']; // SQL Server
        } else {
            return '';
        }
    }
public function getSqlState ( ) : string { if ( isset ( $ this -> errors [ 0 ] [ 'sqlstate' ] ) ) { return $ this -> errors [ 0 ] [ 'sqlstate' ] ; // MySQL } elseif ( isset ( $ this -> errors [ 0 ] [ 'SQLSTATE' ] ) ) { return $ this -> errors [ 0 ] [ 'SQLSTATE' ] ; // SQL Server } else { return '' ; } }
Returns the SQLSTATE error for the exception
Returns the SQLSTATE error for the exception