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
pdostatement.debugdumpparams(3) - php
pdostatement.fetchall(3) - php
pdostatement.bindparam(3) - php
pdostatement.bindvalue(3) - php
pdo.errorcode(3) - php
Similar Topics in the Unix Linux Community
Forum Video Tutorial: How to Use Code Tags
UNIX.COM 2017 Year End Summary
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
Please Welcome Don Cragun as Lead Moderator
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wolf Machowitsch