The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
See also PDO::ATTR_CURSOR_NAME.
PDO::FETCH_ORI_NEXT
(int)
PDO::FETCH_ORI_PRIOR
(int)
PDO::FETCH_ORI_FIRST
(int)
PDO::FETCH_ORI_LAST
(int)
PDO::FETCH_ORI_ABS
(int)
PDO::FETCH_ORI_REL
(int)
PDO::CURSOR_FWDONLY
(int)
PDO::CURSOR_SCROLL
(int)
PDO::FETCH_ORI_*
constants to control the rows fetched from the result set.
PDO::PARAM_BOOL
(int)
PDO::PARAM_NULL
(int)
PDO::PARAM_INT
(int)
PDO::PARAM_STR
(int)
PDO::PARAM_STR_NATL
(int)
PDO::PARAM_STR_CHAR
(int)
PDO::PARAM_LOB
(int)
PDO::PARAM_STMT
(int)
PDO::PARAM_INPUT_OUTPUT
(int)
PDO::PARAM_* constants.
PDO::ATTR_AUTOCOMMIT
(int)
false, PDO attempts to disable autocommit so that the
connection begins a transaction.
PDO::ATTR_PREFETCH
(int)
PDO::ATTR_TIMEOUT
(int)
PDO::ATTR_ERRMODE
(int)
PDO::ATTR_SERVER_VERSION
(int)
PDO::ATTR_CLIENT_VERSION
(int)
PDO::ATTR_SERVER_INFO
(int)
PDO::ATTR_CONNECTION_STATUS
(int)
PDO::ATTR_CASE
(int)
PDO::CASE_*
constants.
PDO::ATTR_CURSOR_NAME
(int)
PDO::ATTR_CURSOR
(int)
PDO::CURSOR_FWDONLY or
PDO::CURSOR_SCROLL.
Unless one has a need for scrollable cursors, one should use the
PDO::CURSOR_FWDONLY cursor mode.
PDO::ATTR_DRIVER_NAME
(int)
Example #1 using PDO::ATTR_DRIVER_NAME
<?php
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
echo "Running on mysql; doing something mysql specific here\n";
}
?>PDO::ATTR_ORACLE_NULLS
(int)
PDO::ATTR_PERSISTENT
(int)
PDO::ATTR_STATEMENT_CLASS
(int)
PDO::ATTR_FETCH_CATALOG_NAMES
(int)
PDO::ATTR_FETCH_TABLE_NAMES
(int)
PDO::ATTR_STRINGIFY_FETCHES
(int)
null) to be treated as strings.
null values remain unchanged unless PDO::ATTR_ORACLE_NULLS
is set to PDO::NULL_TO_STRING.
PDO::ATTR_MAX_COLUMN_LEN
(int)
PDO::ATTR_DEFAULT_FETCH_MODE
(int)
PDO::ATTR_EMULATE_PREPARES
(int)
PDO::ATTR_DEFAULT_STR_PARAM
(int)
PDO::PARAM_STR_NATL
and PDO::PARAM_STR_CHAR.
Available as of PHP 7.2.0.
PDO::ERRMODE_SILENT
(int)
PDO::ERRMODE_WARNING
(int)
E_WARNING message if an error occurs.
See Errors and error handling
for more information about this attribute.
PDO::ERRMODE_EXCEPTION
(int)
PDO::CASE_NATURAL
(int)
PDO::CASE_LOWER
(int)
PDO::CASE_UPPER
(int)
PDO::NULL_NATURAL
(int)
PDO::NULL_EMPTY_STRING
(int)
PDO::NULL_TO_STRING
(int)
PDO::ERR_NONE
(string)
'00000', meaning that the SQL
statement was successfully issued with no errors or warnings.
This constant is a convenience constant to help when checking
PDO::errorCode() or
PDOStatement::errorCode() to determine if an error
occurred.
This is usually known by examining the return code from the method
that raised the error condition anyway.
PDO::PARAM_EVT_ALLOC
(int)
PDO::PARAM_EVT_FREE
(int)
PDO::PARAM_EVT_EXEC_PRE
(int)
PDO::PARAM_EVT_EXEC_POST
(int)
PDO::PARAM_EVT_FETCH_PRE
(int)
PDO::PARAM_EVT_FETCH_POST
(int)
PDO::PARAM_EVT_NORMALIZE
(int)
PDO::SQLITE_DETERMINISTIC
(int)