esemény
Tanúsítványt szerezhet a Microsoft Fabricben – ingyenesen!
nov. 19. 23 - dec. 10. 23
A Microsoft Fabric közösségi csapata korlátozott ideig ingyenes DP-600 vizsgautalványokat kínál.
Előkészítés mostEzt a böngészőt már nem támogatjuk.
Frissítsen a Microsoft Edge-re, hogy kihasználhassa a legújabb funkciókat, a biztonsági frissítéseket és a technikai támogatást.
Retrieves extended error information of the most recent operation on the statement handle.
array PDOStatement::errorInfo();
An array of error information about the most recent operation on the statement handle. The array consists of the following fields:
The SQLSTATE error code
The driver-specific error code
The driver-specific error message
If there is no error, or if the SQLSTATE is not set, the driver-specific fields will be NULL.
Support for PDO was added in version 2.0 of the Microsoft Drivers for PHP for SQL Server.
In this example, the SQL statement has an error, which is then reported.
<?php
$conn = new PDO( "sqlsrv:server=(local) ; Database = AdventureWorks", "", "");
$stmt = $conn->prepare('SELECT * FROM Person.Addressx');
$stmt->execute();
print_r ($stmt->errorInfo());
?>
When an exception occurs, the ODBC Driver may return more than one error to help diagnose problems. However, PDOStatement::errorInfo always shows only the first error. In response to this bug report, PDO::errorInfo and PDOStatement::errorInfo have been updated to indicate that drivers should display at least the following three fields:
0 SQLSTATE error code (a five characters alphanumeric identifier defined in the ANSI SQL standard).
1 Driver specific error code.
2 Driver specific error message.
Starting with 5.9.0, the default behavior of PDOStatement::errorInfo is to show additional ODBC errors, if they are available. See PDO::errorInfo for more details.
esemény
Tanúsítványt szerezhet a Microsoft Fabricben – ingyenesen!
nov. 19. 23 - dec. 10. 23
A Microsoft Fabric közösségi csapata korlátozott ideig ingyenes DP-600 vizsgautalványokat kínál.
Előkészítés most