/PHP-7.2/ext/dba/tests/ |
H A D | bug70825.phpt | 13 dba_insert('foo', 23, $db); 14 dba_insert('foo', 42, $db); 15 dba_insert('foo', 1337, $db); 19 dba_close($db); 29 dba_close($db); 33 dba_insert('[foo]bar', 23, $db); 34 dba_insert('[foo]bar', 42, $db); 39 dba_close($db); 43 dba_insert('[foo]bar', 23, $db); 44 dba_insert('[foo]bar', 42, $db); [all …]
|
/PHP-7.2/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_rollback.phpt | 8 $db = MySQLPDOTest::factory(); 18 $db->beginTransaction(); 29 $db->rollBack(); 35 $db->beginTransaction(); 40 $db->rollBack(); 49 $db->beginTransaction(); 51 $db->rollBack(); 61 $db->rollBack(); 67 $db->rollBack(); 73 $db->commit(); [all …]
|
H A D | pdo_mysql_stmt_bindparam_types.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 19 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0); 21 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1); 23 $db->exec('DROP TABLE IF EXISTS test'); 41 $stmt = $db->query('SELECT id, label FROM test'); 90 $db->exec('DROP TABLE IF EXISTS test'); 103 // pdo_mysql_stmt_bindparam_types($db, 2, 'BIT(8)', 1); 106 pdo_mysql_stmt_bindparam_types($db, 5, 'BOOLEAN', 1); [all …]
|
H A D | pdo_mysql_begintransaction.phpt | 23 $db->errorCode(), implode(' ', $db->errorInfo())); 32 $db = null; 48 if (!$db->commit()) 70 if (!$db->commit()) 89 if (!$db->rollback()) 125 $db->commit(); 138 $db->errorCode(), implode(' ', $db->errorInfo())); 154 $db->errorCode(), implode(' ', $db->errorInfo())); 162 if (!$db->commit()) 167 $db->errorCode(), implode(' ', $db->errorInfo())); [all …]
|
H A D | pdo_mysql_types.phpt | 15 $db->exec('DROP TABLE IF EXISTS test'); 17 @$db->exec($sql); 18 if ($db->errorCode() != 0) { 86 $db = MySQLPDOTest::factory(); 92 test_type($db, 20, 'BIT(8)', 1); 106 test_type($db, 100, 'INT', -2147483648, 135 test_type($db, 340, 'TIME', '14:37:00'); 140 test_type($db, 380, 'CHAR(1)', 'a'); 143 test_type($db, 410, 'VARCHAR(1)', 'a'); 180 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_exec_ddl.phpt | 16 $ret = @$db->exec($sql); 18 $ret = $db->exec($sql); 23 $db->errorCode(), implode(' ', $db->errorInfo())); 29 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo())); 37 $db = MySQLPDOTest::factory(); 38 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 76 $db->errorCode(), implode(' ', $db->errorInfo())); 83 $db = MySQLPDOTest::factory(); 84 MySQLPDOTest::dropTestTable($db); 86 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl'); [all …]
|
H A D | pdo_mysql_commit.phpt | 8 $db = MySQLPDOTest::factory(); 15 $db = MySQLPDOTest::factory(); 16 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 28 $db->errorCode(), implode(' ', $db->errorInfo())); 42 if (true !== ($tmp = $db->commit())) 44 $db->errorCode(), implode(' ', $db->errorInfo())); 56 $db = MySQLPDOTest::factory(); 65 $db->errorCode(), implode(' ', $db->errorInfo())); 78 $db->errorCode(), implode(' ', $db->errorInfo())); 85 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_last_insert_id.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 16 if ('0' !== ($tmp = $db->lastInsertId())) 24 $db->exec('DROP TABLE IF EXISTS test'); 57 $next_id = (int)$db->lastInsertId(); 71 $next_id = (int)$db->lastInsertId(); 79 $db->exec('LOCK TABLE test WRITE'); 95 $next_id = (int)$db->lastInsertId(); 101 … printf("[014] %s, [%s} %s\n", $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 104 @$db->exec('UNLOCK TABLE test'); [all …]
|
H A D | pdo_mysql_stmt_nextrowset.phpt | 10 $db = MySQLPDOTest::factory(); 40 function test_proc1($db) { 75 test_proc1($db); 76 test_proc2($db); 82 test_proc1($db); 83 test_proc2($db); 91 test_proc1($db); 92 test_proc2($db); 99 test_proc1($db); 100 test_proc2($db); [all …]
|
H A D | bug_pecl_12925.phpt | 9 $db = MySQLPDOTest::factory(); 14 $db = MySQLPDOTest::factory(); 16 function bug_pecl_1295($db) { 18 $db->exec('DROP TABLE IF EXISTS test'); 19 $db->exec('CREATE TABLE test(id CHAR(1))'); 25 $stmt = $db->prepare('SELECT id FROM test'); 33 $db = MySQLPDOTest::factory(); 35 bug_pecl_1295($db); 38 $db = MySQLPDOTest::factory(); 40 bug_pecl_1295($db); [all …]
|
H A D | pdo_mysql_errorcode.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 35 $code = $db->errorCode(); 36 check_error(2, $db); 40 check_error(3, $db); 45 check_error(4, $db); 51 check_error(7, $db, '42S02'); 55 check_error(8, $db); 58 $db2 = &$db; [all …]
|
H A D | pdo_mysql_stmt_getcolumnmeta.phpt | 9 $db = MySQLPDOTest::factory(); 10 $stmt = $db->query('SELECT VERSION() as _version'); 19 $db = MySQLPDOTest::factory(); 21 MySQLPDOTest::createTestTable($db); 71 $db->exec('DROP TABLE IF EXISTS test'); 81 $db->errorCode(), var_export($db->errorInfo(), true)); 236 $db->exec('DROP TABLE IF EXISTS test'); 257 $db->exec('DROP TABLE IF EXISTS test'); 278 $db->exec('DROP TABLE IF EXISTS test'); 306 $e->getMessage(), $db->errorInfo(), implode(' ', $db->errorInfo())); [all …]
|
H A D | pdo_mysql_errorinfo.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 45 $code = $db->errorCode(); 46 check_error($offset + 2, $db); 50 check_error($offset + 3, $db); 55 check_error($offset + 5, $db); 67 $db2 = &$db; 85 $offset + 19, $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 91 pdo_mysql_errorinfo($db, 0); [all …]
|
H A D | pdo_mysql_exec.phpt | 15 $ret = $db->exec($sql); 19 $db->errorCode(), implode(' ', $db->errorInfo())); 25 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo())); 33 $db = MySQLPDOTest::factory(); 34 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 54 printf("[016] [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo())); 65 $db->errorCode(), implode(' ', $db->errorInfo())); 107 $db->errorCode(), implode(' ', $db->errorInfo())); 144 $db->errorCode(), implode(' ', $db->errorInfo())); 159 $db->errorCode(), var_export($db->errorInfo(), true)); [all …]
|
H A D | pdo_mysql_attr_autocommit.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 25 if (!$db->setAttribute(PDO::ATTR_AUTOCOMMIT, 0)) 33 if (!$db->query('SET autocommit = 1')) 40 if (!$db->query('SET autocommit = 0')) 43 if (!$db->setAttribute(PDO::ATTR_AUTOCOMMIT, 1)) 56 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 67 $db->query('ROLLBACK'); 75 $db->query('DELETE FROM test WHERE id = 100'); 76 $db->query('ROLLBACK'); [all …]
|
/PHP-7.2/ext/pgsql/tests/ |
H A D | 05large_object.phpt | 10 $db = pg_connect($conn_str); 13 pg_exec ($db, "begin"); 14 $oid = pg_lo_create ($db); 20 pg_exec ($db, "commit"); 23 pg_exec ($db, "begin"); 29 pg_exec ($db, "commit"); 32 pg_exec ($db, "begin"); 37 pg_exec ($db, "commit"); 40 pg_exec ($db, "begin"); 46 pg_exec ($db, "begin"); [all …]
|
H A D | 31nb_async_query_prepared.phpt | 14 $db = pg_connect($conn_str); 16 $version = pg_version($db); 22 $db_socket = pg_socket($db); 29 nb_flush($db, $db_socket); 32 nb_consume($db, $db_socket); 43 nb_flush($db, $db_socket); 46 nb_consume($db, $db_socket); 81 nb_flush($db, $db_socket); 84 nb_consume($db, $db_socket); 95 nb_flush($db, $db_socket); [all …]
|
H A D | 02connection.phpt | 11 $db = pg_pconnect($conn_str); 12 var_dump($db); 14 if (pg_connection_status($db) != PGSQL_CONNECTION_OK) 18 if (!pg_connection_reset($db)) 22 if (pg_connection_busy($db)) 32 if (false === pg_host($db)) 36 if (!pg_dbname($db)) 40 if (!pg_port($db)) 44 if (pg_tty($db)) 48 if (pg_options($db)) [all …]
|
H A D | 26async_query_prepared.phpt | 13 $db = pg_connect($conn_str); 15 $version = pg_version($db); 20 while(pg_connection_busy($db)); // busy wait: intended 21 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { 24 if (!($result = pg_get_result($db))) 30 if (!pg_send_execute($db, 'php_test', array(100))) { 33 while(pg_connection_busy($db)); // busy wait: intended 37 if (!($result = pg_get_result($db))) 79 if (!($result = pg_get_result($db))) 93 if (!($result = pg_get_result($db))) [all …]
|
/PHP-7.2/ext/pgsql/ |
H A D | mysql_users.php | 19 function pg_list_dbs($db) argument 21 assert(is_resource($db)); 31 return pg_query($db, $query); 38 function pg_list_tables($db) argument 40 assert(is_resource($db)); 53 return pg_query($db, $query); 61 function pg_list_fields($db, $table) argument 63 assert(is_resource($db)); 79 return pg_query($db, $query);
|
/PHP-7.2/ext/pdo_firebird/tests/ |
H A D | ddl.phpt | 12 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 15 $db->exec("CREATE GENERATOR gen_ddl_id"); 16 $db->exec("CREATE TRIGGER ddl_bi FOR ddl BEFORE INSERT AS 19 $db->setAttribute(PDO::ATTR_AUTOCOMMIT,0); 21 $db->beginTransaction(); 23 var_dump($db->exec("UPDATE ddl SET text='blabla'")); 24 $db->rollback(); 26 $db->beginTransaction(); 27 var_dump($db->exec("DELETE FROM ddl")); 28 $db->commit(); [all …]
|
/PHP-7.2/ext/pdo_dblib/tests/ |
H A D | bug_38955.phpt | 13 $db->query("CREATE table php_test(val int)"); 14 $db->beginTransaction(); 15 $db->query("INSERT INTO php_test(val) values(1)"); 16 $db->query("INSERT INTO php_test(val) values(2)"); 17 $db->query("INSERT INTO php_test(val) values(3)"); 18 $db->query("INSERT INTO php_test(val) values(4)"); 19 $db->commit(); 22 $db->beginTransaction(); 27 $db->rollback(); 29 $rs = $db->query("SELECT * FROM php_test"); [all …]
|
H A D | pdo_dblib_quote.phpt | 11 var_dump($db->quote(true, PDO::PARAM_BOOL)); 12 var_dump($db->quote(false, PDO::PARAM_BOOL)); 13 var_dump($db->quote(42, PDO::PARAM_INT)); 14 var_dump($db->quote(null, PDO::PARAM_NULL)); 15 var_dump($db->quote('\'', PDO::PARAM_STR)); 16 var_dump($db->quote('foo', PDO::PARAM_STR)); 17 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); 18 var_dump($db->quote('über', PDO::PARAM_STR | PDO::PARAM_STR_NATL)); 21 $db->setAttribute(PDO::ATTR_DEFAULT_STR_PARAM, PDO::PARAM_STR_NATL); 24 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); [all …]
|
/PHP-7.2/ext/pdo_pgsql/tests/ |
H A D | bug48764.phpt | 10 $db = PDOTest::factory(); 27 bug($db); 30 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0)); 31 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 1)); 34 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1); 35 bug($db); 37 bug($db); 42 $db = PDOTest::factory('PDO', false); 46 bug($db); 52 function bug($db, $options = array()) { [all …]
|
/PHP-7.2/ext/pdo_sqlite/tests/ |
H A D | pdo_sqlite_transaction.phpt | 8 $db = new pdo('sqlite::memory:'); 10 $db->beginTransaction(); 12 $db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)'); 13 $db->commit(); 15 $db->beginTransaction(); 16 $db->query('INSERT INTO foobar VALUES (NULL, "PHP")'); 17 $db->query('INSERT INTO foobar VALUES (NULL, "PHP6")'); 18 $db->rollback(); 20 $r = $db->query('SELECT COUNT(*) FROM foobar'); 24 $db->query('DROP TABLE foobar');
|