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-2019169 43

READMEH A D05-Dec-20191.9 KiB5336

config.m4H A D05-Dec-20191.4 KiB5441

config.w32H A D05-Dec-2019398 118

pdo.cH A D05-Dec-20199.2 KiB404269

pdo.phpH A D05-Dec-20191.2 KiB6343

pdo_dbh.cH A D11-Aug-202047.4 KiB1,6121,227

pdo_sql_parser.cH A D05-Dec-201915.5 KiB740624

pdo_sql_parser.reH A D05-Dec-201911.1 KiB426365

pdo_sqlstate.cH A D05-Dec-201913.3 KiB334304

pdo_stmt.cH A D25-Sep-202074 KiB2,7282,114

php_pdo.hH A D05-Dec-20192.6 KiB8644

php_pdo_driver.hH A D31-Aug-202024.4 KiB707343

php_pdo_error.hH A D05-Dec-20191.9 KiB4615

php_pdo_int.hH A D05-Dec-20193 KiB7230

README

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