public function errorInfo(){
        if ($this->getConnection() instanceof PDO) {
            $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!';
        } elseif ($this->getConnection() instanceof mysqli) {
            $message = $this->getConnection()->error;
        }

        return $message;
    }
public function errorInfo(){
        if ($this->getConnection() instanceof PDO) {
            $message = isset($this->connection->errorInfo()['message']) ? $this->getConnection()->errorInfo()['message'] : 'Something Went Wrong!';
        } elseif ($this->getConnection() instanceof mysqli) {
            $message = $this->getConnection()->error;
        }

        return $message;
    }
public function errorInfo ( ) { if ( $ this -> getConnection ( ) instanceof PDO ) { $ message = isset ( $ this -> connection -> errorInfo ( ) [ 'message' ] ) ? $ this -> getConnection ( ) -> errorInfo ( ) [ 'message' ] : 'Something Went Wrong!' ; } elseif ( $ this -> getConnection ( ) instanceof mysqli ) { $ message = $ this -> getConnection ( ) -> error ; } return $ message ; }
return the last query error

@return string
return the last query error