Home
last modified time | relevance | path

Searched refs:db (Results 1 – 25 of 824) sorted by relevance

12345678910>>...33

/PHP-8.1/ext/dba/tests/
H A Dbug70825.phpt14 dba_insert('foo', 23, $db);
15 dba_insert('foo', 42, $db);
16 dba_insert('foo', 1337, $db);
20 dba_close($db);
30 dba_close($db);
34 dba_insert('[foo]bar', 23, $db);
35 dba_insert('[foo]bar', 42, $db);
40 dba_close($db);
44 dba_insert('[foo]bar', 23, $db);
45 dba_insert('[foo]bar', 42, $db);
[all …]
/PHP-8.1/ext/pdo_mysql/tests/
H A Dpdo_mysql_rollback.phpt9 $db = MySQLPDOTest::factory();
17 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
19 $db->beginTransaction();
30 $db->rollBack();
36 $db->beginTransaction();
42 $db->rollBack();
55 $db->rollBack();
65 $db->rollBack();
71 $db->rollBack();
77 $db->commit();
[all …]
H A Dpdo_mysql_stmt_bindparam_types.phpt9 $db = MySQLPDOTest::factory();
14 $db = MySQLPDOTest::factory();
15 MySQLPDOTest::createTestTable($db);
20 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0);
22 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1);
24 $db->exec('DROP TABLE IF EXISTS test');
42 $stmt = $db->query('SELECT id, label FROM test');
91 $db->exec('DROP TABLE IF EXISTS test');
104 // pdo_mysql_stmt_bindparam_types($db, 2, 'BIT(8)', 1);
107 pdo_mysql_stmt_bindparam_types($db, 5, 'BOOLEAN', 1);
[all …]
H A Dpdo_mysql_types.phpt16 $db->exec('DROP TABLE IF EXISTS test');
18 @$db->exec($sql);
19 if ($db->errorCode() != 0) {
87 $db = MySQLPDOTest::factory();
93 test_type($db, 20, 'BIT(8)', 1);
107 test_type($db, 100, 'INT', -2147483648,
136 test_type($db, 340, 'TIME', '14:37:00');
141 test_type($db, 380, 'CHAR(1)', 'a');
144 test_type($db, 410, 'VARCHAR(1)', 'a');
181 $db = MySQLPDOTest::factory();
[all …]
H A Dpdo_mysql_begintransaction.phpt9 $db = MySQLPDOTest::factory();
25 $db->errorCode(), implode(' ', $db->errorInfo()));
34 $db = null;
51 if (!$db->commit())
73 if (!$db->commit())
128 $db->commit();
141 $db->errorCode(), implode(' ', $db->errorInfo()));
157 $db->errorCode(), implode(' ', $db->errorInfo()));
165 if (!$db->commit())
170 $db->errorCode(), implode(' ', $db->errorInfo()));
[all …]
H A Dpdo_mysql_exec_ddl.phpt17 $ret = @$db->exec($sql);
19 $ret = $db->exec($sql);
24 $db->errorCode(), implode(' ', $db->errorInfo()));
30 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo()));
38 $db = MySQLPDOTest::factory();
39 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
77 $db->errorCode(), implode(' ', $db->errorInfo()));
84 $db = MySQLPDOTest::factory();
85 MySQLPDOTest::dropTestTable($db);
87 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl');
[all …]
H A Dpdo_mysql_inTransaction.phpt17 $db = MySQLPDOTest::factory();
46 $db->beginTransaction();
48 $db->exec($end);
52 $db->exec('START TRANSACTION');
53 var_dump($db->inTransaction());
54 $db->rollBack();
55 var_dump($db->inTransaction());
58 $db->commit();
63 $db->beginTransaction();
69 $db->beginTransaction();
[all …]
H A Dpdo_mysql_stmt_getcolumnmeta.phpt10 $db = MySQLPDOTest::factory();
11 $stmt = $db->query('SELECT VERSION() as _version');
20 $db = MySQLPDOTest::factory();
22 MySQLPDOTest::createTestTable($db);
64 $db->exec('DROP TABLE IF EXISTS test');
74 $db->errorCode(), var_export($db->errorInfo(), true));
228 $db->exec('DROP TABLE IF EXISTS test');
249 $db->exec('DROP TABLE IF EXISTS test');
270 $db->exec('DROP TABLE IF EXISTS test');
298 $e->getMessage(), $db->errorInfo(), implode(' ', $db->errorInfo()));
[all …]
H A Dpdo_mysql_errorcode.phpt9 $db = MySQLPDOTest::factory();
14 $db = MySQLPDOTest::factory();
15 MySQLPDOTest::createTestTable($db);
36 $code = $db->errorCode();
37 check_error(2, $db);
41 check_error(3, $db);
46 check_error(4, $db);
52 check_error(7, $db, '42S02');
56 check_error(8, $db);
59 $db2 = &$db;
[all …]
H A Dbug80458.phpt15 $db = MySQLPDOTest::factory();
20 $db->query('DROP TABLE IF EXISTS test');
46 $db->exec('DROP PROCEDURE IF EXISTS nores');
48 $stmt4 = $db->prepare('CALL nores()');
53 $db->exec('DROP PROCEDURE IF EXISTS ret');
55 $stmt5 = $db->prepare('CALL ret()');
60 $db->exec('DROP PROCEDURE IF EXISTS ret');
89 $stmt4 = $db->prepare('CALL nores()');
94 $db->exec('DROP PROCEDURE IF EXISTS ret');
96 $stmt5 = $db->prepare('CALL ret()');
[all …]
H A Dbug_pecl_12925.phpt10 $db = MySQLPDOTest::factory();
15 $db = MySQLPDOTest::factory();
17 function bug_pecl_1295($db) {
19 $db->exec('DROP TABLE IF EXISTS test');
20 $db->exec('CREATE TABLE test(id CHAR(1))');
26 $stmt = $db->prepare('SELECT id FROM test');
34 $db = MySQLPDOTest::factory();
36 bug_pecl_1295($db);
39 $db = MySQLPDOTest::factory();
41 bug_pecl_1295($db);
[all …]
H A Dpdo_mysql_stmt_nextrowset.phpt9 $db = MySQLPDOTest::factory();
35 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 Dbug79375.phpt17 $db = MySQLPDOTest::factory();
20 return $db;
23 $db = createDB();
31 $db->exec("START TRANSACTION");
47 $stmt = $db->prepare($query);
62 $stmt = $db->prepare($query);
75 unset($db);
79 $db = createDB();
83 unset($db);
87 $db = createDB();
[all …]
H A Dpdo_mysql_last_insert_id.phpt9 $db = MySQLPDOTest::factory();
14 $db = MySQLPDOTest::factory();
17 if ('0' !== ($tmp = $db->lastInsertId()))
25 $db->exec('DROP TABLE IF EXISTS test');
26 if ('0' !== ($tmp = $db->lastInsertId()))
30 if ('0' !== ($tmp = $db->lastInsertId()))
58 $next_id = (int)$db->lastInsertId();
72 $next_id = (int)$db->lastInsertId();
102 … printf("[014] %s, [%s} %s\n", $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
105 @$db->exec('UNLOCK TABLE test');
[all …]
H A Dpdo_mysql_commit.phpt9 $db = MySQLPDOTest::factory();
16 $db = MySQLPDOTest::factory();
17 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
28 $db->commit();
48 if (true !== ($tmp = $db->commit()))
50 $db->errorCode(), implode(' ', $db->errorInfo()));
62 $db = MySQLPDOTest::factory();
71 $db->errorCode(), implode(' ', $db->errorInfo()));
84 $db->errorCode(), implode(' ', $db->errorInfo()));
91 $db = MySQLPDOTest::factory();
[all …]
H A Dpdo_mysql_errorinfo.phpt9 $db = MySQLPDOTest::factory();
14 $db = MySQLPDOTest::factory();
15 MySQLPDOTest::createTestTable($db);
46 $code = $db->errorCode();
47 check_error($offset + 2, $db);
51 check_error($offset + 3, $db);
56 check_error($offset + 5, $db);
68 $db2 = &$db;
86 $offset + 19, $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
92 pdo_mysql_errorinfo($db, 0);
[all …]
H A Dpdo_mysql_exec.phpt16 $ret = $db->exec($sql);
20 $db->errorCode(), implode(' ', $db->errorInfo()));
26 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo()));
34 $db = MySQLPDOTest::factory();
35 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
55 printf("[016] [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo()));
66 $db->errorCode(), implode(' ', $db->errorInfo()));
108 $db->errorCode(), implode(' ', $db->errorInfo()));
145 $db->errorCode(), implode(' ', $db->errorInfo()));
160 $db->errorCode(), var_export($db->errorInfo(), true));
[all …]
/PHP-8.1/ext/pdo_pgsql/tests/
H A Dbug48764.phpt12 $db = PDOTest::factory();
29 bug($db);
32 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0));
33 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 1));
36 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
37 bug($db);
38 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
39 bug($db);
44 $db = PDOTest::factory('PDO', false);
48 bug($db);
[all …]
/PHP-8.1/ext/pdo_dblib/tests/
H A Dbug_38955.phpt14 $db->query("CREATE table php_test(val int)");
15 $db->beginTransaction();
16 $db->query("INSERT INTO php_test(val) values(1)");
17 $db->query("INSERT INTO php_test(val) values(2)");
18 $db->query("INSERT INTO php_test(val) values(3)");
19 $db->query("INSERT INTO php_test(val) values(4)");
20 $db->commit();
23 $db->beginTransaction();
28 $db->rollback();
30 $rs = $db->query("SELECT * FROM php_test");
[all …]
H A Dpdo_dblib_quote.phpt12 var_dump($db->quote(true, PDO::PARAM_BOOL));
13 var_dump($db->quote(false, PDO::PARAM_BOOL));
14 var_dump($db->quote(42, PDO::PARAM_INT));
15 var_dump($db->quote(null, PDO::PARAM_NULL));
16 var_dump($db->quote('\'', PDO::PARAM_STR));
17 var_dump($db->quote('foo', PDO::PARAM_STR));
18 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR));
19 var_dump($db->quote('über', PDO::PARAM_STR | PDO::PARAM_STR_NATL));
22 $db->setAttribute(PDO::ATTR_DEFAULT_STR_PARAM, PDO::PARAM_STR_NATL);
25 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR));
[all …]
/PHP-8.1/ext/pgsql/tests/
H A D31nb_async_query_prepared.phpt16 $db = pg_connect($conn_str);
18 $version = pg_version($db);
24 $db_socket = pg_socket($db);
31 nb_flush($db, $db_socket);
34 nb_consume($db, $db_socket);
45 nb_flush($db, $db_socket);
48 nb_consume($db, $db_socket);
83 nb_flush($db, $db_socket);
86 nb_consume($db, $db_socket);
100 nb_consume($db, $db_socket);
[all …]
H A D02connection.phpt13 $db = pg_pconnect($conn_str);
14 var_dump($db);
16 if (pg_connection_status($db) != PGSQL_CONNECTION_OK)
20 if (!pg_connection_reset($db))
24 if (pg_connection_busy($db))
34 if (false === pg_host($db))
38 if (!pg_dbname($db))
42 if (!pg_port($db))
46 if (pg_tty($db))
50 if (pg_options($db))
[all …]
H A D26async_query_prepared.phpt15 $db = pg_connect($conn_str);
17 $version = pg_version($db);
22 while(pg_connection_busy($db)); // busy wait: intended
23 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) {
26 if (!($result = pg_get_result($db)))
32 if (!pg_send_execute($db, 'php_test', array(100))) {
35 while(pg_connection_busy($db)); // busy wait: intended
39 if (!($result = pg_get_result($db)))
81 if (!($result = pg_get_result($db)))
95 if (!($result = pg_get_result($db)))
[all …]
/PHP-8.1/ext/pdo/tests/
H A Dbug_64172.phpt17 $db = PDOTest::factory();
19 @$db->exec("DROP TABLE test");
20 $db->exec("CREATE TABLE test (x int)");
21 $db->exec("INSERT INTO test VALUES (1)");
24 $db->query('SELECT * FROM bad_table');
28 var_dump(is_int($db->errorInfo()[1])) . "\n";
31 $stmt = $db->query('SELECT * FROM test');
34 var_dump($db->errorInfo());
44 $db->exec("INSERT INTO test VALUES (2)");
45 var_dump($db->errorInfo());
[all …]
/PHP-8.1/ext/pdo_sqlite/tests/
H A Dpdo_sqlite_transaction.phpt8 $db = new PDO('sqlite::memory:');
9 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
11 $db->beginTransaction();
13 $db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)');
14 $db->commit();
16 $db->beginTransaction();
17 $db->query('INSERT INTO foobar VALUES (NULL, "PHP")');
18 $db->query('INSERT INTO foobar VALUES (NULL, "PHP6")');
19 $db->rollback();
21 $r = $db->query('SELECT COUNT(*) FROM foobar');
[all …]

Completed in 42 milliseconds

12345678910>>...33