/PHP-5.6/ext/pdo/ |
H A D | pdo_dbh.c | 578 stmt->dbh = dbh; in PHP_METHOD() 623 if (dbh->methods->begin(dbh TSRMLS_CC)) { in PHP_METHOD() 1059 dbh->methods->fetch_err(dbh, dbh->query_stmt, return_value TSRMLS_CC); in PHP_METHOD() 1117 stmt->dbh = dbh; in PHP_METHOD() 1294 if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { in pdo_hash_methods() 1515 dbh->methods->closer(dbh TSRMLS_CC); in dbh_free() 1543 pefree(dbh, dbh->is_persistent); in dbh_free() 1558 if (dbh->in_txn && dbh->methods && dbh->methods->rollback) { in pdo_dbh_free_storage() 1559 dbh->methods->rollback(dbh TSRMLS_CC); in pdo_dbh_free_storage() 1577 dbh = emalloc(sizeof(*dbh)); in pdo_dbh_new() [all …]
|
H A D | php_pdo_error.h | 26 PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC); 29 strlcpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \ 30 if (dbh->query_stmt) { \ 31 dbh->query_stmt = NULL; \ 32 zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \ 36 #define PDO_HANDLE_DBH_ERR() if (strcmp(dbh->error_code, PDO_ERR_NONE)) { pdo_handle_error(dbh, … 37 …RR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt TSRMLS_CC); }
|
/PHP-5.6/ext/pdo_mysql/ |
H A D | mysql_driver.c | 85 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 …]
|
/PHP-5.6/ext/pdo_firebird/ |
H A D | firebird_driver.c | 102 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 …]
|
/PHP-5.6/ext/pdo_odbc/ |
H A D | odbc_driver.c | 106 if (!dbh->methods) { in pdo_odbc_error() 140 dbh->driver_data = NULL; in odbc_handle_closer() 273 if (dbh->auto_commit) { in odbc_handle_begin() 302 if (dbh->auto_commit) { in odbc_handle_commit() 400 dbh->driver_data = H; in pdo_odbc_handle_factory() 448 if (dbh->username && *dbh->username && !strstr(dbh->data_source, "uid") in pdo_odbc_handle_factory() 451 spprintf(&dsn, 0, "%s;UID=%s;PWD=%s", dbh->data_source, dbh->username, dbh->password); in pdo_odbc_handle_factory() 452 pefree((char*)dbh->data_source, dbh->is_persistent); in pdo_odbc_handle_factory() 453 dbh->data_source = dsn; in pdo_odbc_handle_factory() 460 …rc = SQLConnect(H->dbc, (char*)dbh->data_source, SQL_NTS, dbh->username, SQL_NTS, dbh->password, S… in pdo_odbc_handle_factory() [all …]
|
/PHP-5.6/ext/pdo_firebird/tests/ |
H A D | rowCount.phpt | 13 @$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 …]
|
H A D | bug_64037.phpt | 11 $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 D | bug_48877.phpt | 13 @$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 D | bug_62024.phpt | 11 $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 D | bug_47415.phpt | 11 $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 D | bug_53280.phpt | 11 $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);
|
/PHP-5.6/ext/pdo_pgsql/ |
H A D | pgsql_driver.c | 154 pdo_dbh_t *dbh = self->dbh; in pgsql_lob_close() local 196 self->dbh = dbh; in pdo_pgsql_create_lob_stream() 547 dbh->in_txn = pgsql_handle_in_transaction(dbh TSRMLS_CC); in pgsql_handle_commit() 562 pdo_dbh_t *dbh; in PHP_METHOD() local 676 pdo_dbh_t *dbh; in PHP_METHOD() local 775 pdo_dbh_t *dbh; in PHP_METHOD() local 870 pdo_dbh_t *dbh; in PHP_METHOD() local 947 pdo_dbh_t *dbh; in PHP_METHOD() local 974 pdo_dbh_t *dbh; in PHP_METHOD() local 1026 pdo_dbh_t *dbh; in PHP_METHOD() local [all …]
|
/PHP-5.6/ext/pdo_oci/tests/ |
H A D | pdo_oci_attr_autocommit_2.phpt | 13 $dbh = PDOTest::factory(); 23 $dbh->beginTransaction(); 27 $dbh->commit(); 32 $dbh->rollback(); 37 $dbh->beginTransaction(); 41 $dbh->commit(); 46 $dbh->rollback(); 56 $dbh->rollback(); 71 $dbh->rollback(); 84 $dbh->exec("rollback"); [all …]
|
H A D | pdo_oci_attr_case.phpt | 14 function do_query1($dbh) 16 var_dump($dbh->getAttribute(PDO::ATTR_CASE)); 17 $s = $dbh->prepare("select dummy from dual"); 24 function do_query2($dbh, $mode) 34 $dbh = PDOTest::factory(); 38 $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); 39 do_query1($dbh); 43 do_query1($dbh); 46 $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER); 47 do_query1($dbh); [all …]
|
H A D | pdo_oci_attr_nulls_1.phpt | 14 function do_query($dbh) 16 var_dump($dbh->getAttribute(PDO::ATTR_ORACLE_NULLS)); 17 $s = $dbh->prepare("select '' as myempty, null as mynull from dual"); 25 $dbh = PDOTest::factory(); 28 do_query($dbh); 31 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL); // No conversion. 33 do_query($dbh); 36 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING); // Empty string is converted to… 38 do_query($dbh); 41 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING); // NULL is converted to an empty s… [all …]
|
H A D | pdo_oci_attr_autocommit_1.phpt | 14 $dbh = PDOTest::factory(); 16 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); 17 $dbh->exec("drop table pdo_ac_tab"); 18 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 21 var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT)); 25 $dbh->setAttribute(PDO::ATTR_AUTOCOMMIT, false); 28 var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT)); 32 $dbh->setAttribute(PDO::ATTR_AUTOCOMMIT, true); 35 var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT)); 40 $dbh->exec("create table pdo_ac_tab (col1 varchar2(20))"); [all …]
|
H A D | pdo_oci_attr_autocommit_3.phpt | 16 $dbh = PDOTest::factory(); 18 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); 19 $dbh->exec("drop table pdo_ac_tab"); 21 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 24 var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT)); 28 $dbh->exec("create table pdo_ac_tab (col1 varchar2(20))"); 30 $dbh->exec("insert into pdo_ac_tab (col1) values ('some data')"); 32 $dbh = null; // close first connection
|
H A D | pecl_bug_6364.phpt | 13 $dbh = PDOTest::factory(); 15 @$dbh->exec ("drop table bug_6364_t"); 17 $dbh->exec ("create table bug_6364_t (c1 varchar2(10), c2 varchar2(10), c3 varchar2(10), c4 varchar… 19 $dbh->exec ("create or replace procedure bug_6364_sp(p1 IN varchar2, p2 IN varchar2, p3 IN varchar2… 21 $stmt = $dbh->prepare("call bug_6364_sp('p1','p2','p3',?,?)"); 29 $stmt->execute() or die ("Execution error: " . var_dump($dbh->errorInfo())); 34 foreach ($dbh->query("select * from bug_6364_t") as $row) { 41 $dbh->exec ("drop procedure bug_6364_sp"); 42 $dbh->exec ("drop table bug_6364_t");
|
/PHP-5.6/ext/pdo_dblib/ |
H A D | dblib_driver.c | 88 pefree(H, dbh->is_persistent); in dblib_handle_closer() 89 dbh->driver_data = NULL; in dblib_handle_closer() 307 php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, nvars); in pdo_dblib_handle_factory() 309 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_dblib_handle_factory() 311 H->err.sqlstate = dbh->error_code; in pdo_dblib_handle_factory() 338 if (dbh->username) { in pdo_dblib_handle_factory() 344 if (dbh->password) { in pdo_dblib_handle_factory() 393 dbh->max_escaped_char_length = 2; in pdo_dblib_handle_factory() 394 dbh->alloc_own_columns = 1; in pdo_dblib_handle_factory() 403 dbh->methods = &dblib_methods; in pdo_dblib_handle_factory() [all …]
|
/PHP-5.6/ext/pdo_oci/ |
H A D | oci_driver.c | 166 dbh->is_closed = 1; in _oci_error() 190 if (!dbh->methods) { in _oci_error() 355 (dbh->auto_commit && !dbh->in_txn) ? OCI_COMMIT_ON_SUCCESS : OCI_DEFAULT); in oci_handle_doer() 448 if (dbh->in_txn) { in oci_handle_set_attribute() 456 dbh->in_txn = 0; in oci_handle_set_attribute() 600 php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, 2); in pdo_oci_handle_factory() 603 dbh->driver_data = H; in pdo_oci_handle_factory() 662 if (dbh->username) { in pdo_oci_handle_factory() 664 dbh->username, strlen(dbh->username), in pdo_oci_handle_factory() 673 if (dbh->password) { in pdo_oci_handle_factory() [all …]
|
/PHP-5.6/ext/pdo_sqlite/ |
H A D | sqlite_driver.c | 80 if (!dbh->methods) { in _pdo_sqlite_error() 192 pdo_sqlite_error(dbh); in sqlite_handle_preparer() 201 pdo_sqlite_error(dbh); in sqlite_handle_preparer() 212 pdo_sqlite_error(dbh); in sqlite_handle_doer() 247 pdo_sqlite_error(dbh); in sqlite_handle_begin() 261 pdo_sqlite_error(dbh); in sqlite_handle_commit() 542 pdo_dbh_t *dbh; in PHP_METHOD() local 613 pdo_dbh_t *dbh; in PHP_METHOD() local 675 pdo_dbh_t *dbh; in PHP_METHOD() local 821 dbh->driver_data = H; in pdo_sqlite_handle_factory() [all …]
|
/PHP-5.6/ext/pgsql/tests/ |
H A D | 80_bug39971.phpt | 12 $dbh = @pg_connect($conn_str); 13 if (!$dbh) { 20 pg_insert($dbh, 'php_test', $values); 23 pg_update($dbh, 'php_test', $values, $ids); 25 pg_query($dbh, "DROP TABLE php_test"); 26 pg_close($dbh);
|
H A D | 80_bug32223.phpt | 26 $dbh = @pg_connect($conn_str); 27 if (!$dbh) { 33 $res = pg_query($dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 40 $res = pg_query($dbh, 'SET client_min_messages TO NOTICE;'); 42 $res = pg_query($dbh, 'SELECT test_notice()'); 49 var_dump(pg_last_notice($dbh)); 52 pg_close($dbh);
|
H A D | 80_bug32223b.phpt | 26 define('dbh', pg_connect($conn_str)); 27 if (!dbh) { 33 $res = pg_query(dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 40 $res = pg_query(dbh, 'SET client_min_messages TO NOTICE;'); 44 $res = pg_query(dbh, 'SELECT test_notice()'); 50 var_dump(pg_last_notice(dbh)); 55 pg_close(dbh);
|
H A D | 80_bug42783.phpt | 12 $dbh = @pg_connect($conn_str); 13 if (!$dbh) { 19 pg_insert($dbh, 'php_test', array()); 23 pg_query($dbh, "DROP TABLE php_test"); 24 pg_close($dbh);
|