Home
last modified time | relevance | path

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

12345678910

/PHP-7.4/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-7.4/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.phpt8 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');
18 $pdo->beginTransaction();
20 $pdo->query("CREATE TABLE b66584 (a int)");
21 $pdo->query("INSERT INTO b66584 VALUES (165)");
24 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, (bool)$i);
27 run($pdo, [0 => 1, 2 => 165, 5 => 3]);
40 $pdo->query("DROP TABLE b66584");
41 $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);
H A Dbug68371.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);
49 var_dump($pdo->getAttribute($a));
51 $pdo->setAttribute($a, $v);
52 if ($pdo->getAttribute($a) === $v) {
H A Dbug69362.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);
/PHP-7.4/ext/pdo_mysql/tests/
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 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 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 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");
H A Dpdo_mysql___construct_ini.phpt13 pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock"
21 if ('pdo.dsn.mysql' == $name) {
22 printf("pdo.dsn.mysql=%s\n", $dsn);
28 $dsn = ini_get('pdo.dsn.mysql');
33 printf("pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()\n");
55 pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()
/PHP-7.4/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 PDO not available');
7 $pdo = new PDO("sqlite:".__DIR__."/foo.db");
14 $pdo = new PDO("sqlite:".__DIR__."/foo.db");
19 var_dump($pdo->setAttribute($attr, NULL));
20 var_dump($pdo->setAttribute($attr, 1));
21 var_dump($pdo->setAttribute($attr, 'nonsense'));
/PHP-7.4/ext/pdo_sqlite/tests/
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 47 milliseconds

12345678910