Home
last modified time | relevance | path

Searched refs:dbh (Results 1 – 25 of 65) sorted by path

123

/PHP-5.5/ext/pdo/
H A DREADME24 $dbh = new PDO("...", $user, $pass, array(PDO_ATTR_AUTOCOMMIT => true));
30 $dbh = new PDO("...", $user, $pass, array(PDO_ATTR_AUTOCOMMIT => false));
32 When auto-commit is off, you must then use $dbh->beginTransaction() to
33 initiate a transaction. When your work is done, you then call $dbh->commit()
34 or $dbh->rollBack() to persist or abort your changes respectively. Not all
39 $dbh->setAttribute(PDO_ATTR_AUTOCOMMIT, false);
45 $dbh->beginTransaction(). When you commit() or rollBack() such a transaction,
H A DTODO48 settable at dbh and stmt levels independently. If set at the dbh level,
50 defaults for the dbh will come from the INI settings.
H A Dpdo_dbh.c584 stmt->dbh = dbh; in PHP_METHOD()
629 if (dbh->methods->begin(dbh TSRMLS_CC)) { in PHP_METHOD()
1063 dbh->methods->fetch_err(dbh, dbh->query_stmt, return_value TSRMLS_CC); in PHP_METHOD()
1120 stmt->dbh = dbh; in PHP_METHOD()
1297 if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { in pdo_hash_methods()
1528 dbh->methods->closer(dbh TSRMLS_CC); in dbh_free()
1556 pefree(dbh, dbh->is_persistent); in dbh_free()
1571 if (dbh->in_txn && dbh->methods && dbh->methods->rollback) { in pdo_dbh_free_storage()
1572 dbh->methods->rollback(dbh TSRMLS_CC); in pdo_dbh_free_storage()
1590 dbh = emalloc(sizeof(*dbh)); in pdo_dbh_new()
[all …]
H A Dpdo_sql_parser.c516 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "no parameters were bound" TSRMLS_CC); in pdo_parse_params()
556 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined" TSRMLS_CC); in pdo_parse_params()
559 if (stmt->dbh->methods->quoter) { in pdo_parse_params()
569 if (!stmt->dbh->methods->quoter(stmt->dbh, buf, len, &plc->quoted, &plc->qlen, in pdo_parse_params()
573 strncpy(stmt->error_code, stmt->dbh->error_code, 6); in pdo_parse_params()
611 if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL(tmp_param), in pdo_parse_params()
616 strncpy(stmt->error_code, stmt->dbh->error_code, 6); in pdo_parse_params()
762 if(stmt->dbh->max_escaped_char_length) {
763 padding = stmt->dbh->max_escaped_char_length;
811 if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
[all …]
H A Dpdo_sql_parser.re158 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "no parameters were bound" TSRMLS_CC);
198 pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined" TSRMLS_CC);
201 if (stmt->dbh->methods->quoter) {
211 if (!stmt->dbh->methods->quoter(stmt->dbh, buf, len, &plc->quoted, &plc->qlen,
215 strncpy(stmt->error_code, stmt->dbh->error_code, 6);
253 if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL(tmp_param),
258 strncpy(stmt->error_code, stmt->dbh->error_code, 6);
404 if(stmt->dbh->max_escaped_char_length) {
405 padding = stmt->dbh->max_escaped_char_length;
453 if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
[all …]
H A Dpdo_stmt.c112 if (!stmt->dbh) { \
217 …if (stmt->dbh->native_case != stmt->dbh->desired_case && stmt->dbh->desired_case != PDO_CASE_NATUR… in pdo_stmt_describe_columns()
220 switch (stmt->dbh->desired_case) { in pdo_stmt_describe_columns()
674 if (stmt->dbh->stringify) { in fetch_value()
1713 if (stmt->dbh->methods->fetch_err) { in PHP_METHOD()
1714 stmt->dbh->methods->fetch_err(stmt->dbh, stmt, return_value TSRMLS_CC); in PHP_METHOD()
1974 if (stmt->dbh->is_persistent) { in pdo_stmt_setup_fetch_mode()
2007 if (stmt->dbh->is_persistent) { in pdo_stmt_setup_fetch_mode()
2276 if (!stmt->dbh) { in dbstmt_method_get()
2282 if (!pdo_hash_methods(stmt->dbh, in dbstmt_method_get()
[all …]
H A Dphp_pdo.h78 if (!dbh->driver) { \
79 pdo_raise_impl_error(dbh, NULL, "00000", "PDO constructor was not called" TSRMLS_CC); \
H A Dphp_pdo_driver.h235 int (*db_handle_factory)(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC);
242 typedef int (*pdo_dbh_close_func)(pdo_dbh_t *dbh TSRMLS_DC);
254 typedef int (*pdo_dbh_txn_func)(pdo_dbh_t *dbh TSRMLS_DC);
257 typedef int (*pdo_dbh_set_attr_func)(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC);
272 typedef int (*pdo_dbh_get_attr_func)(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC);
277 typedef int (*pdo_dbh_check_liveness_func)(pdo_dbh_t *dbh TSRMLS_DC);
282 typedef void (*pdo_dbh_request_shutdown)(pdo_dbh_t *dbh TSRMLS_DC);
574 pdo_dbh_t *dbh; member
655 PDO_API void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt,
658 PDO_API void php_pdo_dbh_addref(pdo_dbh_t *dbh TSRMLS_DC);
[all …]
H A Dphp_pdo_int.h58 extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
61 strlcpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
62 if (dbh->query_stmt) { \
63 dbh->query_stmt = NULL; \
64 zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \
68 #define PDO_HANDLE_DBH_ERR() if (strcmp(dbh->error_code, PDO_ERR_NONE)) { pdo_handle_error(dbh, NUL…
69 …_ERR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt TSRMLS_CC); }
74 int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC);
/PHP-5.5/ext/pdo/tests/
H A Dpdo_026.phpt24 public $dbh;
26 protected function __construct($dbh)
28 $this->dbh = $dbh;
70 var_dump(get_class($stmt->dbh));
H A Dpdo_029.phpt24 public $dbh;
26 protected function __construct($dbh)
28 $this->dbh = $dbh;
78 var_dump(get_class($stmt->dbh));
H A Dpdo_030.phpt24 public $dbh;
26 protected function __construct($dbh)
28 $this->dbh = $dbh;
79 var_dump(get_class($stmt->dbh));
/PHP-5.5/ext/pdo_dblib/
H A Ddblib_driver.c88 pefree(H, dbh->is_persistent); in dblib_handle_closer()
89 dbh->driver_data = NULL; in dblib_handle_closer()
302 php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, nvars); in pdo_dblib_handle_factory()
304 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_dblib_handle_factory()
306 H->err.sqlstate = dbh->error_code; in pdo_dblib_handle_factory()
333 if (dbh->username) { in pdo_dblib_handle_factory()
339 if (dbh->password) { in pdo_dblib_handle_factory()
388 dbh->max_escaped_char_length = 2; in pdo_dblib_handle_factory()
389 dbh->alloc_own_columns = 1; in pdo_dblib_handle_factory()
398 dbh->methods = &dblib_methods; in pdo_dblib_handle_factory()
[all …]
H A Ddblib_stmt.c133 …pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO_DBLIB: dbresults() returned FAIL" TSRMLS_CC); in pdo_dblib_stmt_next_rowset()
185 pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO_DBLIB: dbnextrow() returned FAIL" TSRMLS_CC); in pdo_dblib_stmt_fetch()
/PHP-5.5/ext/pdo_firebird/
H A Dfirebird_driver.c102 if (dbh->in_txn) { in firebird_handle_closer()
105 RECORD_ERROR(dbh); in firebird_handle_closer()
109 RECORD_ERROR(dbh); in firebird_handle_closer()
115 RECORD_ERROR(dbh); in firebird_handle_closer()
177 RECORD_ERROR(dbh); in firebird_handle_preparer()
204 RECORD_ERROR(dbh); in firebird_handle_preparer()
242 RECORD_ERROR(dbh); in firebird_handle_doer()
249 RECORD_ERROR(dbh); in firebird_handle_doer()
267 RECORD_ERROR(dbh); in firebird_handle_doer()
408 if (dbh->auto_commit && !dbh->in_txn) { in firebird_alloc_prepare_stmt()
[all …]
H A Dfirebird_statement.c137 if (stmt->dbh->auto_commit && isc_commit_retaining(H->isc_status, &H->tr)) { in firebird_stmt_execute()
H A Dphp_pdo_firebird_int.h131 void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, long line TSRMLS_DC);
/PHP-5.5/ext/pdo_firebird/tests/
H A Dbug_47415.phpt11 $dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
12 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
14 @$dbh->exec('DROP TABLE testz');
15 $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))');
16 $dbh->exec('INSERT INTO testz VALUES(0, \'String0\')');
17 $dbh->commit();
21 $stmt = $dbh->prepare($query);
30 $stmt = $dbh->prepare('DELETE FROM testz');
33 $dbh->commit();
35 $dbh->exec('DROP TABLE testz');
[all …]
H A Dbug_48877.phpt13 @$dbh->exec('DROP TABLE testz');
14 $dbh->exec('CREATE TABLE testz (A integer)');
15 $dbh->exec("INSERT INTO testz VALUES ('1')");
16 $dbh->exec("INSERT INTO testz VALUES ('2')");
17 $dbh->exec("INSERT INTO testz VALUES ('3')");
18 $dbh->commit();
22 $stmt = $dbh->prepare($query);
30 $stmt = $dbh->prepare('DELETE FROM testz');
33 $dbh->commit();
35 $dbh->exec('DROP TABLE testz');
[all …]
H A Dbug_53280.phpt11 $dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
13 @$dbh->exec('DROP TABLE testz');
14 $dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))');
15 $dbh->exec("INSERT INTO testz VALUES ('A', 'B', 'C')");
16 $dbh->commit();
21 $stmth2 = $dbh->prepare($stmt2);
26 $stmth1 = $dbh->prepare($stmt1);
31 $dbh->commit();
35 $dbh->exec('DROP TABLE testz');
38 unset($dbh);
H A Dbug_62024.phpt11 $dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
12 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
14 @$dbh->exec('DROP TABLE test_insert');
15 $dbh->exec("CREATE TABLE test_insert (ID INTEGER NOT NULL, TEXT VARCHAR(10))");
17 $dbh->commit();
22 $sttmt = $dbh->prepare($sql);
33 $dbh->commit();
37 $sttmt = $dbh->prepare('DELETE FROM test_insert');
40 $dbh->commit();
42 $dbh->exec('DROP TABLE test_insert');
[all …]
H A Dbug_64037.phpt11 $dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
12 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
14 @$dbh->exec('DROP TABLE price');
16 $dbh->exec("INSERT INTO PRICE (ID, TEXT, COST) VALUES (1, 'test', -1.0)");
17 $dbh->exec("INSERT INTO PRICE (ID, TEXT, COST) VALUES (2, 'test', -0.99)");
20 $dbh->commit();
23 $stmt = $dbh->prepare($query);
31 $stmt = $dbh->prepare('DELETE FROM price');
34 $dbh->commit();
36 $dbh->exec('DROP TABLE price');
[all …]
H A DrowCount.phpt13 @$dbh->exec('DROP TABLE testz');
15 $dbh->exec("INSERT INTO testz VALUES ('A')");
16 $dbh->exec("INSERT INTO testz VALUES ('A')");
17 $dbh->exec("INSERT INTO testz VALUES ('B')");
18 $dbh->commit();
22 $stmt = $dbh->prepare($query);
32 $dbh->commit();
34 $stmt = $dbh->prepare('DELETE FROM testz');
38 $dbh->commit();
40 $dbh->exec('DROP TABLE testz');
[all …]
/PHP-5.5/ext/pdo_mysql/
H A Dmysql_driver.c85 dbh->is_persistent); in _pdo_mysql_error()
90 dbh->is_persistent); in _pdo_mysql_error()
106 if (!dbh->methods) { in _pdo_mysql_error()
203 pdo_mysql_error(dbh); in mysql_handle_preparer()
219 pdo_mysql_error(dbh); in mysql_handle_preparer()
264 pdo_mysql_error(dbh); in mysql_handle_doer()
269 pdo_mysql_error(dbh); in mysql_handle_doer()
575 php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, 5);
586 pdo_mysql_error(dbh);
590 dbh->driver_data = H;
[all …]
H A Dmysql_statement.c59 pefree(S->einfo.errmsg, stmt->dbh->is_persistent); in pdo_mysql_stmt_dtor()
520 pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource" TSRMLS_CC); in pdo_mysql_stmt_param_hook()

Completed in 64 milliseconds

123