protected function _getPdoWarning(PDO $pdo)
    {
        $originalErrorMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);
        $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
        $stm = $pdo->query('SHOW WARNINGS');
        $pdo->setAttribute(PDO::ATTR_ERRMODE, $originalErrorMode);
        return $stm->fetchObject();
    }
protected function _getPdoWarning(PDO $pdo)
    {
        $originalErrorMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);
        $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
        $stm = $pdo->query('SHOW WARNINGS');
        $pdo->setAttribute(PDO::ATTR_ERRMODE, $originalErrorMode);
        return $stm->fetchObject();
    }
protected function _getPdoWarning ( PDO $ pdo ) { $ originalErrorMode = $ pdo -> getAttribute ( PDO :: ATTR_ERRMODE ) ; $ pdo -> setAttribute ( PDO :: ATTR_ERRMODE , PDO :: ERRMODE_WARNING ) ; $ stm = $ pdo -> query ( 'SHOW WARNINGS' ) ; $ pdo -> setAttribute ( PDO :: ATTR_ERRMODE , $ originalErrorMode ) ; return $ stm -> fetchObject ( ) ; }
Retrieve the last PDO warning.

@param PDO $pdo
@return mixed
Retrieve the last PDO warning .