







![]() ![]() |
Microsoft Drivers for PHP for SQL Server version 2.0 and 3.0 |
PDOStatement::getAttribute |
See Also Send Feedback |
Retrieves the value of a predefined PDOStatement attribute or custom driver attribute.
Syntax
mixed PDOStatement::getAttribute( $attribute ); |
Parameters
$attribute: An integer, one of the PDO::ATTR_* or PDO::SQLSRV_ATTR_* constants. Supported attributes are the attributes you can set with PDOStatement::setAttribute, PDO::SQLSRV_ATTR_DIRECT_QUERY (see Direct Statement Execution and Prepared Statement Execution in the PDO_SQLSRV Driver for more information about PDO::SQLSRV_ATTR_DIRECT_QUERY), and PDO::ATTR_CURSOR.
Return Value
On success, returns a (mixed) value for a predefined PDO attribute or custom driver attribute. Returns null on failure.
Remarks
See PDOStatement::setAttribute for a sample.
Support for PDO was added in version 2.0 of the Microsoft Drivers for PHP for SQL Server.