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.fetchcolumn(3) - php
pdostatement.debugdumpparams(3) - php
pdo.exec(3) - php
pdostatement.bindvalue(3) - php
pdostatement.errorinfo(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
Forum Video Tutorial: How to Use Code Tags
Please Welcome Don Cragun as Lead Moderator
Status of UNIX.COM Forum Transformation
Denial Of Service Attack Update