Name Date Size #Lines LOC

..05-Dec-2019-

tests/H05-Dec-2019-

CREDITSH A D05-Dec-2019101 32

Makefile.fragH A D05-Dec-20191.2 KiB3629

Makefile.frag.w32H A D05-Dec-2019155 43

READMEH A D05-Dec-20191.9 KiB5537

TODOH A D05-Dec-20192.3 KiB9362

config.m4H A D05-Dec-20191.4 KiB5542

config.w32H A D05-Dec-2019406 129

package2.xmlH A D05-Dec-20195 KiB135125

pdo.cH A D05-Dec-20199.1 KiB406269

pdo.phpH A D05-Dec-20191.2 KiB6343

pdo_dbh.cH A D05-Dec-201946.8 KiB1,5981,211

pdo_sql_parser.cH A D05-Dec-201915.5 KiB743625

pdo_sql_parser.reH A D05-Dec-201911 KiB428366

pdo_sqlstate.cH A D05-Dec-201913.3 KiB336304

pdo_stmt.cH A D05-Dec-201974.1 KiB2,7262,111

php_pdo.hH A D05-Dec-20192.7 KiB8844

php_pdo_driver.hH A D05-Dec-201924.2 KiB705341

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