pdostatement.errorcode(3) php man page | unix.com

Man Page: pdostatement.errorcode

Operating Environment: php

Section: 3

PDOSTATEMENT.ERRORCODE(3)						 1						 PDOSTATEMENT.ERRORCODE(3)

PDOStatement::errorCode - Fetch the SQLSTATE associated with the last operation on the statement handle

SYNOPSIS
public string PDOStatement::errorCode (void )
DESCRIPTION
RETURN VALUES
Identical to PDO.errorCode(3), except that PDOStatement.errorCode(3) only retrieves error codes for operations performed with PDOStatement objects.
EXAMPLES
Example #1 Retrieving an SQLSTATE code <?php /* Provoke an error -- the BONES table does not exist */ $err = $dbh->prepare('SELECT skull FROM bones'); $err->execute(); echo " PDOStatement::errorCode(): "; print $err->errorCode(); ?> The above example will output: PDOStatement::errorCode(): 42S02
SEE ALSO
PDO.errorCode(3), PDO.errorInfo(3), PDOStatement.errorInfo(3). PHP Documentation Group PDOSTATEMENT.ERRORCODE(3)
Related Man Pages
pdo.query(3) - php
pdostatement.debugdumpparams(3) - php
pdostatement.fetchall(3) - php
pdostatement.bindcolumn(3) - php
pdo.exec(3) - php
Similar Topics in the Unix Linux Community
UNIX.COM 2017 Year End Summary
Please Welcome Don Cragun as Lead Moderator
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wolf Machowitsch
Please Welcome Nicki Paul to the Moderator Team!