diff --git a/reference/pdo/constants.xml b/reference/pdo/constants.xml
index ffedef4136..b3ebdbe449 100644
--- a/reference/pdo/constants.xml
+++ b/reference/pdo/constants.xml
@@ -1,5 +1,5 @@
-
+
&reftitle.constants;
@@ -68,7 +68,7 @@
-
+ Represents a recordset type. Not currently supported by any drivers.
@@ -280,7 +280,8 @@
Setting the prefetch size allows you to balance speed against memory
usage for your application. Not all database/driver combinations support
- setting of the prefetch size.
+ setting of the prefetch size. A larger prefetch size results in
+ increased performance at the cost of higher memory usage.
@@ -302,7 +303,8 @@
-
+ See the Errors and error
+ handling section for more information about this attribute.
@@ -313,7 +315,8 @@
-
+ This is a read only attribute; it will return information about the
+ version of the database server to which PDO is connected.
@@ -324,7 +327,8 @@
-
+ This is a read only attribute; it will return information about the
+ version of the client libraries that the PDO driver is using.
@@ -335,7 +339,8 @@
-
+ This is a read only attribute; it will return some meta information about the
+ database server to which PDO is connected.
@@ -369,7 +374,8 @@
-
+ Get or set the name to use for a cursor. Most useful when using
+ scrollable cursors and positioned updates.
@@ -380,7 +386,11 @@
-
+ Selects the cursor type. PDO currently supports either
+ PDO_CURSOR_FWDONLY and
+ PDO_CURSOR_SCROLL. Stick with
+ PDO_CURSOR_FWDONLY unless you know that you need a
+ scrollable cursor.
@@ -417,7 +427,7 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
- Convert empty strings to SQL NULL values.
+ Convert empty strings to SQL NULL values on data fetches.
@@ -429,6 +439,8 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Request a persistent connection, rather than creating a new connection.
+ See Connections and Connection
+ management for more information on this attribute.
@@ -441,7 +453,8 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Prepend the containing catalog name to each column name returned in the
result set. The catalog name and column name are separated by a decimal
- (.) character.
+ (.) character. Support of this attribute is at the driver level; it may
+ not be supported by your driver.
@@ -454,7 +467,8 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Prepend the containing table name to each column name returned in the
result set. The table name and column name are separated by a decimal (.)
- character.
+ character. Support of this attribute is at the driver level; it may not
+ be supported by your driver.
@@ -467,6 +481,8 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Do not raise an error or exception if an error occurs. The developer is
expected to explicitly check for errors. This is the default mode.
+ See Errors and error handling
+ for more information about this attribute.
@@ -478,6 +494,8 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Issue a PHP E_WARNING message if an error occurs.
+ See Errors and error handling
+ for more information about this attribute.
@@ -488,7 +506,9 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
- Throw a PDOException if an error occurs.
+ Throw a PDOException if an error occurs.
+ See Errors and error handling
+ for more information about this attribute.
@@ -601,9 +621,9 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
- Create a PDOStatement object with a forward-only cursor. This may improve
- the performance of your application but restricts your PDOStatement object
- to fetching one row at a time from the result set in a forward direction.
+ Create a PDOStatement object with a forward-only cursor. This is the
+ default cursor choice, as it is the fastest and most common data access
+ pattern in PHP.
@@ -627,7 +647,11 @@ if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
Corresponds to SQLSTATE '00000', meaning that the SQL statement was
- successfully issued with no errors or warnings.
+ successfully issued with no errors or warnings. This constant is for
+ your convenience when checking PDO::errorCode or
+ PDOStatement::errorCode to determine if an error
+ occurred. You will usually know if this is the case by examining the
+ return code from the method that raised the error condition anyway.
diff --git a/reference/pdo/reference.xml b/reference/pdo/reference.xml
index 694606cb5b..585b6839cc 100644
--- a/reference/pdo/reference.xml
+++ b/reference/pdo/reference.xml
@@ -1,5 +1,5 @@
-
+
@@ -608,7 +608,7 @@ print "procedure returned $value\n";
- PDO_ERRMODE_SILENT
+ PDO_ERRMODE_SILENT
This is the default mode. PDO will simply set the error code for you
@@ -625,7 +625,7 @@ print "procedure returned $value\n";
- PDO_ERRMODE_WARNING
+ PDO_ERRMODE_WARNING
In addition to setting the error code, PDO will emit a traditional
@@ -636,23 +636,28 @@ print "procedure returned $value\n";
- PDO_ERRMODE_EXCEPTION
+ PDO_ERRMODE_EXCEPTION
- In addition to setting the error code, PDO will throw a PDOException
+ In addition to setting the error code, PDO will throw a
+ PDOException
and set its properties to reflect the error code and error
information. This setting is also useful during debugging, as it will
effectively "blow up" the script at the point of the error, very
quickly pointing a finger at potential problem areas in your code
(remember: transactions are automatically rolled back if the exception
causes the script to terminate).
-
-
+
+
Exception mode is also useful because you can structure your error
handling more clearly than with traditional PHP-style warnings, and
with less code/nesting than by running in silent mode and explicitly
checking the return value of each database call.
+
+ See Exceptions for more
+ information about Exceptions in PHP.
+
@@ -674,9 +679,11 @@ print "procedure returned $value\n";
"large" data in your database. Large typically means "around 4kb or
more", although some databases can happily handle up to 32kb before data becomes
"large". Large objects can be either textual or binary in nature. PDO
- allows you to work with this large data type by using the PDO_PARAM_LOB
+ allows you to work with this large data type by using the
+ PDO_PARAM_LOB
type code in your PDOStatement::bindParam or
- PDOStatement::bindColumn calls. PDO_PARAM_LOB tells
+ PDOStatement::bindColumn calls.
+ PDO_PARAM_LOB tells
PDO to map the data as a stream, so that you can manipulate it using the
PHP Streams API.
@@ -952,6 +959,35 @@ $stmt->execute();
+
+
+ PDOException
+
+ Represents an error raised by PDO. You should not throw a
+ PDOException from your own code.
+ See Exceptions for more
+ information about Exceptions in PHP.
+
+
+ The PDOException class
+
+
+]]>
+
+
+
+
&reference.pdo.constants;