Name Date Size #Lines LOC

..05-Dec-2019-

tests/H05-Dec-2019-

CREDITSH A D05-Dec-2019102 42

Makefile.fragH A D05-Dec-20191.1 KiB3224

READMEH A D05-Dec-20191.9 KiB5737

TODOH A D05-Dec-20192.3 KiB9362

config.m4H A D05-Dec-20191.8 KiB7055

config.w32H A D05-Dec-2019380 118

package2.xmlH A D05-Dec-20195 KiB135125

pdo.cH A D05-Dec-20199.5 KiB423283

pdo.phpH A D05-Dec-20191.2 KiB6343

pdo_dbh.cH A D05-Dec-201947.2 KiB1,6051,217

pdo_sql_parser.cH A D05-Dec-201918.7 KiB854717

pdo_sql_parser.reH A D05-Dec-201914.3 KiB540478

pdo_sqlstate.cH A D05-Dec-201913.3 KiB337304

pdo_stmt.cH A D05-Dec-201974.1 KiB2,7312,115

php_pdo.hH A D05-Dec-20192.7 KiB8844

php_pdo_driver.hH A D05-Dec-201923.9 KiB699339

php_pdo_error.hH A D05-Dec-20191.9 KiB4815

php_pdo_int.hH A D05-Dec-20193 KiB7430

README

1$Id$
2
3PHP Data Objects
4================
5
6Concept: Data Access Abstraction
7
8Goals:
9
101/  Be light-weight
112/  Provide common API for common database operations
123/  Be performant
134/  Keep majority of PHP specific stuff in the PDO core (such as persistent
14    resource management); drivers should only have to worry about getting the
15    data and not about PHP internals.
16
17
18Transactions and autocommit
19===========================
20
21When you create a database handle, you *should* specify the autocommit
22behaviour that you require.  PDO will default to autocommit on.
23
24$dbh = new PDO("...", $user, $pass, array(PDO_ATTR_AUTOCOMMIT => true));
25
26When auto-commit is on, the driver will implicitly commit each query as it is
27executed.  This works fine for most simple tasks but can be significantly
28slower when you are making a large number of udpates.
29
30$dbh = new PDO("...", $user, $pass, array(PDO_ATTR_AUTOCOMMIT => false));
31
32When auto-commit is off, you must then use $dbh->beginTransaction() to
33initiate a transaction.  When your work is done, you then call $dbh->commit()
34or $dbh->rollBack() to persist or abort your changes respectively.  Not all
35databases support transactions.
36
37You can change the auto-commit mode at run-time:
38
39$dbh->setAttribute(PDO_ATTR_AUTOCOMMIT, false);
40
41Regardless of the error handling mode set on the database handle, if the
42autocommit mode cannot be changed, an exception will be thrown.
43
44Some drivers will allow you to temporarily disable autocommit if you call
45$dbh->beginTransaction().  When you commit() or rollBack() such a transaction,
46the handle will switch back to autocommit mode again.  If the mode could not
47be changed, an exception will be raised, as noted above.
48
49When the database handle is closed or destroyed (or at request end for
50persistent handles), the driver will implicitly rollBack().  It is your
51responsibility to call commit() when you are done making changes and
52autocommit is turned off.
53
54vim:tw=78:et
55
56
57