/PHP-8.4/ext/dba/tests/ |
H A D | bug70825.phpt | 14 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.4/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_rollback.phpt | 20 $db->beginTransaction(); 31 $db->rollBack(); 37 $db->beginTransaction(); 42 $db->rollBack(); 53 $db->beginTransaction(); 55 $db->rollBack(); 63 $db->beginTransaction(); 65 $db->rollBack(); 71 $db->rollBack(); 77 $db->commit(); [all …]
|
H A D | pdo_mysql_stmt_bindparam_types.phpt | 13 $db = MySQLPDOTest::factory(); 17 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0); 19 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1); 22 if ((!$stmt = $db->prepare($sql)) || (!$stmt->execute())) 97 // pdo_mysql_stmt_bindparam_types($db, 2, 'BIT(8)', 1); 98 pdo_mysql_stmt_bindparam_types($db, 3, 'TINYINT', -127); 100 pdo_mysql_stmt_bindparam_types($db, 5, 'BOOLEAN', 1); 109 pdo_mysql_stmt_bindparam_types($db, 14, 'REAL', -1000); 155 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 163 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_types.phpt | 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, 128 test_type($db, 250, 'DECIMAL', -1.01, '-1'); 135 test_type($db, 330, 'DATE', '2008-04-23'); 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'); [all …]
|
H A D | pdo_mysql_begintransaction.phpt | 24 $db->errorCode(), implode(' ', $db->errorInfo())); 33 $db = null; 39 printf("[005] [%s] %s\n", $db->errorCode(), implode(' ', $db->errorInfo())); 50 if (!$db->commit()) 72 if (!$db->commit()) 127 $db->commit(); 140 $db->errorCode(), implode(' ', $db->errorInfo())); 156 $db->errorCode(), implode(' ', $db->errorInfo())); 164 if (!$db->commit()) 169 $db->errorCode(), implode(' ', $db->errorInfo())); [all …]
|
H A D | pdo_mysql_inTransaction.phpt | 17 $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 D | pdo_mysql_stmt_nextrowset.phpt | 14 $db = MySQLPDOTest::factory(); 26 function test_proc1($db) { 67 test_proc1($db); 68 test_proc2($db); 74 test_proc1($db); 75 test_proc2($db); 83 test_proc1($db); 84 test_proc2($db); 91 test_proc1($db); 92 test_proc2($db); [all …]
|
H A D | bug79375.phpt | 16 $db = MySQLPDOTest::factory(); 19 return $db; 22 $db = createDB(); 29 $db->exec("START TRANSACTION"); 45 $stmt = $db->prepare($query); 73 unset($db); 77 $db = createDB(); 81 unset($db); 85 $db = createDB(); 89 unset($db); [all …]
|
H A D | pdo_mysql_stmt_getcolumnmeta.phpt | 13 $db = MySQLPDOTest::factory(); 14 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); 40 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0); 69 $db->errorCode(), var_export($db->errorInfo(), true)); 132 $stmt = $db->prepare('SELECT @@sql_mode AS _mode'); 137 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); 138 test_meta($db, 20, 'BIT(8)', 1, 'BIT', PDO::PARAM_INT); 141 test_meta($db, 50, 'BOOLEAN', 1, NULL, PDO::PARAM_INT); 285 $stmt = $db->query('SELECT NULL AS col1'); 293 $e->getMessage(), $db->errorInfo(), implode(' ', $db->errorInfo())); [all …]
|
H A D | bug80458.phpt | 14 $db = MySQLPDOTest::factory(); 16 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 17 $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); 47 $stmt4 = $db->prepare("CALL {$procedure_nores}()"); 55 $stmt5 = $db->prepare("CALL {$procedure_ret}()"); 64 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 88 $stmt4 = $db->prepare("CALL {$procedure_nores}()"); 92 $stmt5 = $db->prepare("CALL {$procedure_ret}()"); 99 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 113 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_errorcode.phpt | 13 $db = MySQLPDOTest::factory(); 34 $code = $db->errorCode(); 35 check_error(2, $db); 39 check_error(3, $db); 44 check_error(4, $db); 50 check_error(7, $db, '42S02'); 54 check_error(8, $db); 57 $db2 = &$db; 59 check_error(10, $db, '42S02'); 74 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); [all …]
|
H A D | pdo_mysql_exec_ddl.phpt | 15 $ret = @$db->exec($sql); 17 $ret = $db->exec($sql); 22 $db->errorCode(), implode(' ', $db->errorInfo())); 28 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo())); 36 $db = MySQLPDOTest::factory(); 44 if (1 === @$db->exec("CREATE DATABASE {$db_name}")) { 73 $db->errorCode(), implode(' ', $db->errorInfo())); 81 $db = MySQLPDOTest::factory(); 82 $db->exec('DROP TABLE IF EXISTS pdo_mysql_exec_ddl'); 83 $db->exec('DROP TABLE IF EXISTS pdo_mysql_exec_ddl_2'); [all …]
|
H A D | pdo_mysql_last_insert_id.phpt | 13 $db = MySQLPDOTest::factory(); 16 if ('0' !== ($tmp = $db->lastInsertId())) 24 if ('0' !== ($tmp = $db->lastInsertId())) 28 if ('0' !== ($tmp = $db->lastInsertId())) 32 if ('0' !== ($tmp = $db->lastInsertId())) 37 if ('0' !== ($tmp = $db->lastInsertId())) 56 $next_id = (int)$db->lastInsertId(); 70 $next_id = (int)$db->lastInsertId(); 100 … printf("[014] %s, [%s} %s\n", $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 107 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); [all …]
|
H A D | bug_pecl_12925.phpt | 13 $db = MySQLPDOTest::factory(); 15 function bug_pecl_1295($db) { 16 $db->exec('DROP TABLE IF EXISTS test_12925'); 30 $db = MySQLPDOTest::factory(); 31 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1); 32 bug_pecl_1295($db); 35 $db = MySQLPDOTest::factory(); 36 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); 37 bug_pecl_1295($db); 44 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_errorinfo.phpt | 13 $db = MySQLPDOTest::factory(); 16 MySQLPDOTest::createTestTable($table, $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); 96 pdo_mysql_errorinfo($db, 20); [all …]
|
/PHP-8.4/ext/pgsql/tests/ |
H A D | pg_put_copy.phpt | 11 $db = pg_connect($conn_str); 18 var_dump(pg_put_copy_data($db, "")); 19 var_dump(pg_put_copy_end($db)); 21 var_dump(pg_get_result($db)); 24 var_dump(pg_put_copy_data($db, "Error\t1")); 25 var_dump(pg_put_copy_end($db)); 26 var_dump(pg_last_error($db)); 29 var_dump(pg_put_copy_data($db, "Error\t1")); 30 var_dump(pg_put_copy_end($db)); 32 var_dump(pg_get_result($db)); [all …]
|
H A D | 07optional.phpt | 13 $db = pg_connect($conn_str); 14 $enc = pg_client_encoding($db); 16 pg_set_client_encoding($db, $enc); 18 pg_set_error_verbosity($db, PGSQL_ERRORS_TERSE); 19 pg_set_error_verbosity($db, PGSQL_ERRORS_DEFAULT); 20 pg_set_error_verbosity($db, PGSQL_ERRORS_VERBOSE); 21 pg_set_error_verbosity($db, PGSQL_ERRORS_SQLSTATE); 23 pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_NEVER); 24 pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ERRORS); 25 pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ALWAYS);
|
H A D | 26async_query_prepared.phpt | 15 $db = pg_connect($conn_str); 22 while(pg_connection_busy($db)); // busy wait: intended 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))) 102 pg_close($db); 111 $db = pg_connect($conn_str); [all …]
|
H A D | 02connection.phpt | 13 $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)) 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 | 31nb_async_query_prepared.phpt | 16 $db = pg_connect($conn_str); 20 $db_socket = pg_socket($db); 27 nb_flush($db, $db_socket); 30 nb_consume($db, $db_socket); 41 nb_flush($db, $db_socket); 44 nb_consume($db, $db_socket); 79 nb_flush($db, $db_socket); 82 nb_consume($db, $db_socket); 96 nb_consume($db, $db_socket); 104 pg_close($db); [all …]
|
/PHP-8.4/ext/pdo_dblib/tests/ |
H A D | bug_38955.phpt | 14 $db = getDbConnection(); 17 $db->query("CREATE table test38955(val int)"); 18 $db->beginTransaction(); 19 $db->query("INSERT INTO test38955(val) values(1)"); 20 $db->query("INSERT INTO test38955(val) values(2)"); 23 $db->commit(); 26 $db->beginTransaction(); 31 $db->rollback(); 33 $rs = $db->query("SELECT * FROM test38955"); 40 $db = getDbConnection(); [all …]
|
H A D | pdo_dblib_quote.phpt | 13 $db = getDbConnection(); 14 var_dump($db->quote(true, PDO::PARAM_BOOL)); 15 var_dump($db->quote(false, PDO::PARAM_BOOL)); 16 var_dump($db->quote(42, PDO::PARAM_INT)); 17 var_dump($db->quote(null, PDO::PARAM_NULL)); 18 var_dump($db->quote('\'', PDO::PARAM_STR)); 19 var_dump($db->quote('foo', PDO::PARAM_STR)); 20 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); 21 var_dump($db->quote('über', PDO::PARAM_STR | PDO::PARAM_STR_NATL)); 27 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); [all …]
|
/PHP-8.4/ext/pdo_pgsql/tests/ |
H A D | bug48764.phpt | 12 $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 …]
|
H A D | issue78621.inc | 4 if (!isset($db)) { 11 attach($db, array_shift($rounds)); 13 $db->beginTransaction(); 14 $db->exec("set client_min_messages to notice"); 18 $db->exec("insert into t values ('ah')"); 21 attach($db, array_shift($rounds)); 26 $db->exec("delete from t"); 32 $db->setNoticeCallback(null); 33 $db->exec("delete from t"); 34 $db->exec("insert into t values ('ah')"); [all …]
|
/PHP-8.4/ext/pdo/tests/ |
H A D | pdo_017.phpt | 12 $db = PDOTest::factory(); 14 $db->beginTransaction(); 15 $db->rollback(); 31 $db = PDOTest::factory(); 47 global $db; 56 $db->beginTransaction(); 59 $db->rollBack(); 63 $db->beginTransaction(); 66 $db->commit(); 73 $db = PDOTest::factory(); [all …]
|