diff --git a/reference/pdo/functions/pdo-beginTransaction.xml b/reference/pdo/functions/pdo-beginTransaction.xml index ed01bcb1b2..d422e025fa 100644 --- a/reference/pdo/functions/pdo-beginTransaction.xml +++ b/reference/pdo/functions/pdo-beginTransaction.xml @@ -1,14 +1,14 @@ - + beginTransaction - Begins a transaction. + Begins a transaction Description - ??? beginTransaction + boolbeginTransaction &warn.experimental.func; diff --git a/reference/pdo/functions/pdo-bindParam.xml b/reference/pdo/functions/pdo-bindParam.xml index 49fc6fa42f..ecac0a5745 100644 --- a/reference/pdo/functions/pdo-bindParam.xml +++ b/reference/pdo/functions/pdo-bindParam.xml @@ -1,42 +1,40 @@ - + bindParam - Binds a parameter to the specified variable name. + Binds a parameter to the specified variable name Description - ??? bindParam - String - parameter-name - var - variable-name - integer - data-type - integer - length + boolbindParam + stringparameter_name + mixedvariable + intdata_type + intlength &warn.experimental.func; Binds a parameter to the specified variable name. Execute a prepared statement with bound variables - +prepare('SELECT name, colour, calories FROM fruit - WHERE calories < ?' AND colour = ?); -$sth->bindParam(1, $calories, PDO_PARAM_INT) -$sth->bindParam(2, $colour, PDO_PARAM_STR, 12) + WHERE calories < ? AND colour = ?'); +$sth->bindParam(1, $calories, PDO_PARAM_INT); +$sth->bindParam(2, $colour, PDO_PARAM_STR, 12); $sth->execute(); - ]]> +?> +]]> - diff --git a/reference/pdo/functions/pdo-commit.xml b/reference/pdo/functions/pdo-commit.xml index aaa4c46a29..eebc2854f6 100644 --- a/reference/pdo/functions/pdo-commit.xml +++ b/reference/pdo/functions/pdo-commit.xml @@ -1,14 +1,14 @@ - + commit - Commits a transaction. + Commits a transaction Description - ??? commit + boolcommit &warn.experimental.func; @@ -19,4 +19,3 @@ - diff --git a/reference/pdo/functions/pdo-execute.xml b/reference/pdo/functions/pdo-execute.xml index bbc0f623a0..669e9dcfbe 100644 --- a/reference/pdo/functions/pdo-execute.xml +++ b/reference/pdo/functions/pdo-execute.xml @@ -1,16 +1,15 @@ - + execute - Executes a prepared statement. + Executes a prepared statement Description - ??? execute - array - parameters + boolexecute + arrayparameters &warn.experimental.func; @@ -23,31 +22,36 @@ or pass an array of parameter values Execute a prepared statement with bound variables - +prepare('SELECT name, colour, calories FROM fruit - WHERE calories < ?' AND colour = ?); -$sth->bindParam(1, $calories, PDO_PARAM_INT) -$sth->bindParam(2, $colour, PDO_PARAM_STR, 12) + WHERE calories < ? AND colour = ?'); +$sth->bindParam(1, $calories, PDO_PARAM_INT); +$sth->bindParam(2, $colour, PDO_PARAM_STR, 12); $sth->execute(); - ]]> +?> +]]> Execute a prepared statement by passing an array of values - +prepare('SELECT name, colour, calories FROM fruit - WHERE calories < ?' AND colour = ?); + WHERE calories < ? AND colour = ?'); $sth->execute(array(150, 'red')); - ]]> +?> +]]> - diff --git a/reference/pdo/functions/pdo-fetch.xml b/reference/pdo/functions/pdo-fetch.xml index fd8d679562..f15753641c 100644 --- a/reference/pdo/functions/pdo-fetch.xml +++ b/reference/pdo/functions/pdo-fetch.xml @@ -1,48 +1,51 @@ - + fetch - Fetches a row from a result set. + Fetches a row from a result set Description - array fetch - integer - PDO_FETCH_STYLE + arrayfetch + intfetch_style &warn.experimental.func; Fetches a row from a result set associated with a Statement object. - PDO_FETCH_STYLE can be one of the following values: + fetch_style can be one of the following values: - PDO_FETCH_NUM: returns an array indexed by column number - as returned in your result set, starting at column 0 - PDO_FETCH_ASSOC: returns an array indexed by column name - as returned in your result set + + PDO_FETCH_NUM: returns an array indexed by column + number as returned in your result set, starting at column 0 - PDO_FETCH_BOTH (default): returns an array indexed by - both column name and column number as returned in your result set + PDO_FETCH_ASSOC: returns an array indexed by column + name as returned in your result set - PDO_FETCH_OBJ: returns an anonymous object with property names that - correspond to the column names returned in your result set + PDO_FETCH_BOTH (default): returns an array indexed by + both column name and column number as returned in your result set - PDO_FETCH_LAZY: combines PDO_FETCH_BOTH and PDO_FETCH_OBJ, creating - the object variable names as they are accessed + PDO_FETCH_OBJ: returns an anonymous object with + property names that correspond to the column names returned in your + result set - PDO_FETCH_BOUND: returns TRUE and assigns the values of the columns in - your result set to the PHP variables to which they were bound with the - bindParam method + PDO_FETCH_LAZY: combines + PDO_FETCH_BOTH and PDO_FETCH_OBJ, + creating the object variable names as they are accessed + + + PDO_FETCH_BOUND: returns &true; and assigns the + values of the columns in your result set to the PHP variables to which + they were bound with the bindParam method - diff --git a/reference/pdo/functions/pdo-prepare.xml b/reference/pdo/functions/pdo-prepare.xml index f5e991c5f8..94c0beb8a6 100644 --- a/reference/pdo/functions/pdo-prepare.xml +++ b/reference/pdo/functions/pdo-prepare.xml @@ -1,15 +1,15 @@ - + prepare - Prepares an SQL statement. + Prepares an SQL statement Description - Statement prepare - String SQL-statement + objectprepare + stringsql_statement &warn.experimental.func; @@ -19,15 +19,18 @@ Execute a prepared statement by passing an array of values - +prepare('SELECT name, colour, calories FROM fruit - WHERE calories < ?' AND colour = ?); + WHERE calories < ? AND colour = ?'); $sth->execute(array(150, 'red')); -]]> +?> +]]> + - diff --git a/reference/pdo/functions/pdo-rollback.xml b/reference/pdo/functions/pdo-rollback.xml index 8aa40bb04e..57f065ff98 100644 --- a/reference/pdo/functions/pdo-rollback.xml +++ b/reference/pdo/functions/pdo-rollback.xml @@ -1,14 +1,14 @@ - + rollback - Rolls back a transaction. + Rolls back a transaction Description - ??? rollback + boolrollback &warn.experimental.func; @@ -17,4 +17,3 @@ - diff --git a/reference/pdo/functions/pdo-setAttribute.xml b/reference/pdo/functions/pdo-setAttribute.xml index 3e82eee05d..c930fc3a36 100644 --- a/reference/pdo/functions/pdo-setAttribute.xml +++ b/reference/pdo/functions/pdo-setAttribute.xml @@ -1,35 +1,39 @@ - + setAttribute - Sets a database connection attribute. + Sets a database connection attribute Description - ??? setAttribute - int attribute - int value + boolsetAttribute + intattribute + mixedvalue &warn.experimental.func; Sets a database connection attribute. The generic PDO connection attributes include: - PDO_ATTR_CASE: Force column names to a specific case. - - PDO_CASE_LOWER: Force column names to lower - case. - PDO_CASE_NATURAL: Leave column names as returned by - the database driver. - PDO_CASE_UPPER: Force column names to upper - case. - + + PDO_ATTR_CASE: Force column names to a specific case. + + + PDO_CASE_LOWER: Force column names to lower case. + + + PDO_CASE_NATURAL: Leave column names as returned by + the database driver. + + + PDO_CASE_UPPER: Force column names to upper case. + + PDO drivers may define further driver-specific attributes. - diff --git a/reference/pdo/functions/pdo.xml b/reference/pdo/functions/pdo.xml index a50711e1f2..dc34cec9aa 100644 --- a/reference/pdo/functions/pdo.xml +++ b/reference/pdo/functions/pdo.xml @@ -1,18 +1,18 @@ - + PDO Creates a PDO instance to represent a connection to a - database. + database Description - object PDO - String DSN - String username - String password + objectPDO + stringDSN + stringusername + stringpassword &warn.experimental.func; @@ -38,7 +38,9 @@ by a closed connection handle. Create a connection - +getMessage(); } +?> ]]> - - + + - diff --git a/reference/pdo/reference.xml b/reference/pdo/reference.xml index 3c974618ba..d203845bcc 100644 --- a/reference/pdo/reference.xml +++ b/reference/pdo/reference.xml @@ -1,10 +1,10 @@ - + PHP Data Objects PDO -
+
&reftitle.intro; &warn.experimental; @@ -29,7 +29,7 @@ &reftitle.constructor; - PDO - construct a new PDO + PDO - constructs a new PDO object @@ -39,10 +39,10 @@ beginTransaction - - begin a transaction + - begins a transaction - commit - commit a + commit - commits a transaction @@ -69,7 +69,7 @@
-
+
<classname>Statement</classname> Represents a prepared statement and, after the statement is executed, an associated result set.