Home
last modified time | relevance | path

Searched refs:pdo (Results 1 – 25 of 264) sorted by relevance

1234567891011

/PHP-8.0/ext/pdo/
H A DMakefile.frag14 …$(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \
17 install-pdo-headers:
19 @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo
22 $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
24 $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
26 $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
28 $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
35 install: $(all_targets) $(install_targets) install-pdo-headers
H A Dconfig.m41 PHP_ARG_ENABLE([pdo],
3 [AS_HELP_STRING([--disable-pdo],
12 PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
13 PHP_ADD_EXTENSION_DEP(pdo, spl, true)
14 PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h])
H A Dconfig.w323 ARG_ENABLE("pdo", "Enable PHP Data Objects support", "no");
6 …EXTENSION('pdo', 'pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c', false /* force stat…
7 ADD_EXTENSION_DEP('pdo', 'spl', true);
9 PHP_INSTALL_HEADERS("ext/pdo", "php_pdo.h php_pdo_driver.h php_pdo_error.h");
H A DMakefile.frag.w321 ext\pdo\pdo_sql_parser.c: ext\pdo\pdo_sql_parser.re
3 $(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re
/PHP-8.0/ext/pdo_pgsql/tests/
H A Dbug67462.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
13 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
14 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
15 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
17 $pdo->beginTransaction();
21 $pdo->query("INSERT INTO b67462 VALUES (1), (1)");
23 var_dump($pdo->inTransaction());
24 $pdo->commit(); // This should fail!
26 var_dump($pdo->inTransaction());
[all …]
H A Dbug66584.phpt7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
12 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
13 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
17 $pdo->beginTransaction();
19 $pdo->query("CREATE TABLE b66584 (a int)");
20 $pdo->query("INSERT INTO b66584 VALUES (165)");
23 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, (bool)$i);
26 run($pdo, [0 => 1, 2 => 165, 5 => 3]);
39 $pdo->query("DROP TABLE b66584");
40 $pdo->rollback();
[all …]
H A Dbug69344.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
13 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
14 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
15 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
16 $pdo->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
18 $test = function () use ($pdo) {
24 $stmt = $pdo->prepare("SELECT (?)::text AS a, (?)::text AS b");
36 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true);
H A Dbug64953.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
14 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
15 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
16 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
20 $st = $pdo->prepare('SELECT ?::char as i');
26 $st = $pdo->prepare('SELECT (?)::char as i');
33 $st = $pdo->prepare("SELECT :int::int as i");
37 $st = $pdo->prepare("SELECT '''?'''::text as \":text\"");
H A Dbug69752.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
12 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
13 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
15 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
17 $pdo->beginTransaction();
19 $pdo->exec("
28 $stmt = $pdo->prepare("insert into foo (field1, field2, field3, field4) values (:field1, :field2, :…
51 $pdo->rollBack();
H A Dbug72294.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
12 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
100 public function prepare( $pdo, $sql )
102 //return $pdo->prepare( $sql );
103 $this->cached_statements[$sql] = $pdo->prepare( $sql );
113 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
115 $prepared_statement_cache = new PreparedStatementCache( $pdo );
118 $statement = $prepared_statement_cache->prepare( $pdo, <<<SQL
128 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
[all …]
H A Dbug62479.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
7 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
41 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
42 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
43 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
52 $pdo->query($sql);
59 $pdo->query($dropUser);
63 $pdo->query($sql);
71 $pdo->query($dropUser);
/PHP-8.0/ext/pdo_mysql/tests/
H A Dbug75177.phpt12 $pdo = MySQLPDOTest::factory();
15 $pdo->query("DROP TABLE IF EXISTS $tbl");
16 $pdo->query("CREATE TABLE $tbl (`bit` bit(8)) ENGINE=InnoDB");
17 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (1)");
18 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (0b011)");
19 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (0b01100)");
21 $ret = $pdo->query("SELECT * FROM $tbl")->fetchAll();
H A Dbug79596.phpt16 $pdo = MySQLPDOTest::factory();
17 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
18 $pdo->query('CREATE TABLE bug79596 (broken FLOAT(2,1))');
19 $pdo->query('INSERT INTO bug79596 VALUES(4.9)');
20 var_dump($pdo->query('SELECT broken FROM bug79596')->fetchColumn(0));
26 $pdo = MySQLPDOTest::factory();
27 $pdo->exec("DROP TABLE IF EXISTS bug79596");
H A Dbug63185.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
14 $pdo = MySQLPDOTest::factory();
15 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
17 $pdo->exec('DROP PROCEDURE IF EXISTS test_procedure_error_at_second');
18 $pdo->exec('CREATE PROCEDURE test_procedure_error_at_second ()
24 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
25 $st = $pdo->query('CALL test_procedure_error_at_second()');
34 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
35 $st = $pdo->query('CALL test_procedure_error_at_second()');
H A Dbug70066.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
15 $pdo = MySQLPDOTest::factory();
16 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
17 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
19 $db = $pdo->query('SELECT DATABASE()')->fetchColumn(0);
22 $pdo->query('USE ' . $db);
H A Dbug76815.phpt13 $pdo = MySQLPDOTest::factory();
14 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16 $pdo->query('DROP FUNCTION IF EXISTS tst');
17 $pdo->query('DROP PROCEDURE IF EXISTS tst2');
18 $pdo->query('CREATE FUNCTION tst() RETURNS VARCHAR(5) DETERMINISTIC BEGIN RETURN \'x12345\'; END');
19 $pdo->query('CREATE PROCEDURE tst2() BEGIN SELECT tst(); END');
21 $st = $pdo->prepare('CALL tst2()');
H A Dbug79132.phpt13 $pdo = MySQLPDOTest::factory();
14 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
17 test($pdo);
19 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
20 test($pdo);
22 function test($pdo) {
23 $stmt = $pdo->prepare('select ? a, ? b');
H A Dbug81037.phpt5 if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
14 $pdo = MySQLPDOTest::factory();
15 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
17 MySQLPDOTest::createTestTable($pdo);
20 $stmt = $pdo->prepare($sql);
H A Dbug77289.phpt16 $pdo = new PDO($dsn, $user, $pass, [PDO::ATTR_PERSISTENT => true]);
17 $pdo->exec("DROP TABLE IF EXISTS bug77289");
18 $pdo->exec("CREATE TEMPORARY TABLE bug77289 (x INT)");
19 $pdo->exec("UPDATE bug77289 SET x = x");
/PHP-8.0/ext/pdo/tests/
H A Dbug_38253.phpt5 if (!extension_loaded('pdo')) die('skip');
13 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/');
15 $pdo = PDOTest::factory();
17 $pdo->exec ("create table test (id integer primary key, n varchar(255))");
18 $pdo->exec ("INSERT INTO test (id, n) VALUES (1, 'hi')");
20 $pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_CLASS);
21 $stmt = $pdo->prepare ("SELECT * FROM test");
25 $pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_FUNC);
26 $stmt = $pdo->prepare ("SELECT * FROM test");
H A Dbug_44159.phpt2 PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
5 if (!extension_loaded('pdo')) die('skip');
13 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/');
15 $pdo = PDOTest::factory();
16 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
22 var_dump($pdo->setAttribute($attr, NULL));
27 var_dump($pdo->setAttribute($attr, 1));
32 var_dump($pdo->setAttribute($attr, 'nonsense'));
H A Dpdo_quote_empty_string.phpt5 if (!extension_loaded('pdo')) die('skip');
13 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/');
16 $pdo = PDOTest::factory();
17 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
20 $result = $pdo->quote('');
/PHP-8.0/ext/pdo_sqlite/tests/
H A Dbug_44159_sqlite_version.phpt9 $pdo = new PDO("sqlite:".__DIR__."/foo.db");
10 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
12 var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, NULL));
13 var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, 1));
14 var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, 'nonsense'));
H A Dbug66033.phpt17 $pdo = new PDO('sqlite::memory:', null, null);
18 $pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('DBStatement',
19 array($pdo)));
20 $pdo->exec("CREATE TABLE IF NOT EXISTS messages (
27 $pdoStatement = $pdo->query("select * from messages");
H A Dpdo_sqlite_get_attribute.phpt8 $pdo = new PDO('sqlite::memory:');
9 var_dump($pdo->getAttribute(PDO::ATTR_SERVER_VERSION));
10 var_dump($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION));

Completed in 71 milliseconds

1234567891011