:: Σαν Σήμερα
1800:
Ο Τζον Άνταμς γίνεται ο πρώτος Αμερικανός Πρόεδρος, που κατοικεί στον Λευκό Οίκο.

1869:
Ανοίγει η διώρυγα του Σουέζ, μήκους 168 χμ, η οποία ενώνει τη Μεσόγειο με την Ερυθρά Θάλασσα.

1973:
Τα μεσάνυχτα τα τανκ περικυκλώνουν το Πολυτεχνείο, προκειμένου να καταστείλουν τη φοιτητική εξέγερση κατά της δικτατορίας. Οι φοιτητές καλούν τους στρατιώτες να ενωθούν μαζί τους. Ξημερώματα ένα τανκ γκρεμίζει την κεντρική πύλη περνώντας πάνω από τα σώματα όσων ήταν σκαρφαλωμένοι πάνω της και αφήνει πίσω του νεκρούς και τραυματίες. Η χούντα ανακοινώνει 16 νεκρούς, ενώ επανέρχεται ο στρατιωτικός νόμος από την κυβέρνηση Μαρκεζίνη.










PDOStatement::errorCode

PDOStatement::errorCode

(no version information, might be only in CVS)

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

Description

int PDOStatement::errorCode ( void )

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

Return Values

Returns a SQLSTATE, a five-character alphanumeric identifier defined in the ANSI SQL standard. PDOStatement::errorCode() only retrieves error codes for operations performed with PDOStatement objects.

Examples

Example 1. Retrieving a SQLSTATE code

<?php
/* Provoke an error -- the BONES table does not exist */
$err = $dbh->prepare('SELECT skull FROM bones');
$err->execute();

echo
"\nPDOStatement::errorCode(): ";
print
$err->errorCode();
?>

The above example will output:

PDOStatement::errorCode(): 42S02

See Also

PDO::errorCode()
PDO::errorInfo()
PDOStatement::errorInfo()