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.
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::FETCH_DEFAULT
(int)
PDO::FETCH_LAZY
(int)
PDO::FETCH_LAZY
returns
a PDORow object
which creates the object property names as they are accessed.
Not valid inside PDOStatement::fetchAll().
PDO::FETCH_ASSOC
(int)
PDO::FETCH_ASSOC
returns
only a single value per column name.
PDO::FETCH_NAMED
(int)
PDO::FETCH_NAMED
returns
an array of values per column name.
PDO::FETCH_NUM
(int)
PDO::FETCH_BOTH
(int)
PDO::FETCH_OBJ
(int)
PDO::FETCH_BOUND
(int)
PDO::FETCH_COLUMN
(int)
PDO::FETCH_CLASS
(int)
Note: The magic __set() method is called if the property doesn't exist in the requested class
PDO::FETCH_INTO
(int)
PDO::FETCH_FUNC
(int)
PDO::FETCH_GROUP
(int)
PDO::FETCH_COLUMN
or
PDO::FETCH_KEY_PAIR
.
PDO::FETCH_UNIQUE
(int)
PDO::FETCH_KEY_PAIR
(int)
PDO::FETCH_CLASSTYPE
(int)
PDO::FETCH_SERIALIZE
(int)
PDO::FETCH_INTO
but object is provided as a serialized string.
The class constructor is never called if this flag is set.
Deprecated as of PHP 8.1.0.
PDO::FETCH_PROPS_LATE
(int)
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
and
PDO::CURSOR_SCROLL
. Stick with
PDO::CURSOR_FWDONLY
unless you know that you need a
scrollable cursor.
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)
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 since 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::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::ERR_NONE
(string)
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)