diff --git a/reference/pdo/functions/PDO-getAttribute.xml b/reference/pdo/functions/PDO-getAttribute.xml index 6a87c74bc9..1943819bfd 100644 --- a/reference/pdo/functions/PDO-getAttribute.xml +++ b/reference/pdo/functions/PDO-getAttribute.xml @@ -1,5 +1,5 @@ - + @@ -76,39 +76,16 @@ getAttribute(PDO::ATTR_AUTOCOMMIT); - -print "\nPDO::ATTR_ERRMODE: "; -print $conn->getAttribute(PDO::ATTR_ERRMODE); - -print "\nPDO::ATTR_CASE: "; -print $conn->getAttribute(PDO::ATTR_CASE); - -print "\nPDO::ATTR_CLIENT_VERSION: "; -print $conn->getAttribute(PDO::ATTR_CLIENT_VERSION); - -print "\nPDO::ATTR_CONNECTION_STATUS: "; -print $conn->getAttribute(PDO::ATTR_CONNECTION_STATUS); - -print "\nPDO::ATTR_ORACLE_NULLS: "; -print $conn->getAttribute(PDO::ATTR_ORACLE_NULLS); - -print "\nPDO::ATTR_PERSISTENT: "; -print $conn->getAttribute(PDO::ATTR_PERSISTENT); - -print "\nPDO::ATTR_PREFETCH: "; -print $conn->getAttribute(PDO::ATTR_PREFETCH); - -print "\nPDO::ATTR_SERVER_INFO: "; -print $conn->getAttribute(PDO::ATTR_SERVER_INFO); - -print "\nPDO::ATTR_SERVER_VERSION: "; -print $conn->getAttribute(PDO::ATTR_SERVER_VERSION); - -print "\nPDO::ATTR_TIMEOUT: "; -print $conn->getAttribute(PDO::ATTR_TIMEOUT); +foreach ($attributes as $val) { + echo "PDO::ATTR_$val: "; + echo $conn->getAttribute(constant("PDO::ATTR_$val")) . "\n"; +} ?> ]]> diff --git a/reference/pdo/functions/PDO-setAttribute.xml b/reference/pdo/functions/PDO-setAttribute.xml index b34c1117ef..a56412d47e 100644 --- a/reference/pdo/functions/PDO-setAttribute.xml +++ b/reference/pdo/functions/PDO-setAttribute.xml @@ -1,5 +1,5 @@ - + @@ -36,6 +36,45 @@ + PDO::ATTR_ERRMODE: Error reporting. + + PDO::ERRMODE_SILENT: + Just set error codes. + PDO::ERRMODE_WARNING: + Raise E_WARNING. + PDO::ERRMODE_EXCEPTION: + Throw exceptions. + + + PDO::ATTR_ORACLE_NULLS + (available with all drivers, not just Oracle): + Conversion of NULL and empty strings. + + PDO::NULL_NATURAL: + No conversion. + PDO::NULL_EMPTY_STRING: + Empty string is converted to &null;. + PDO::NULL_TO_STRING: + NULL is converted to an empty string. + + + PDO::ATTR_STRINGIFY_FETCHES: + Convert numeric values to strings when fetching. + Requires bool. + + PDO::ATTR_STATEMENT_CLASS: + Set user-supplied statement class derived from PDOStatement. + Cannot be used with persistent PDO instances. + Requires array(string classname, array(mixed ctor_args)). + + PDO::ATTR_AUTOCOMMIT + (available in OCI, Firebird and MySQL): + Whether to autocommit every single statement. + + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY + (available in MySQL): + Use buffered queries. + diff --git a/reference/pdo/functions/PDOStatement-getAttribute.xml b/reference/pdo/functions/PDOStatement-getAttribute.xml index 8d5bf3b804..1482bf5b07 100644 --- a/reference/pdo/functions/PDOStatement-getAttribute.xml +++ b/reference/pdo/functions/PDOStatement-getAttribute.xml @@ -1,5 +1,5 @@ - + @@ -15,7 +15,14 @@ intattribute - &warn.undocumented.func; + + Gets an attribute of the statement. Currently, no generic attributes exist but only driver specific: + + PDO::ATTR_CURSOR_NAME (Firebird specific): + Get the name of cursor. + + + diff --git a/reference/pdo/functions/PDOStatement-setAttribute.xml b/reference/pdo/functions/PDOStatement-setAttribute.xml index 1fa861e370..19e432e2d3 100644 --- a/reference/pdo/functions/PDOStatement-setAttribute.xml +++ b/reference/pdo/functions/PDOStatement-setAttribute.xml @@ -1,5 +1,5 @@ - + @@ -16,7 +16,14 @@ mixedvalue - &warn.undocumented.func; + + Sets an attribute on the statement. Currently, no generic attributes are set but only driver specific: + + PDO::ATTR_CURSOR_NAME (Firebird specific): + Set the name of cursor. + + +