From d9ed9945cbe13723e43e19dcfca81aa35e19e4a4 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Wed, 21 Sep 2005 18:49:37 +0000 Subject: [PATCH] - MFB --- ext/pdo/tests/pdo_001.phpt | 1 + ext/pdo/tests/pdo_002.phpt | 1 + ext/pdo/tests/pdo_003.phpt | 1 + ext/pdo/tests/pdo_004.phpt | 1 + ext/pdo/tests/pdo_005.phpt | 1 + ext/pdo/tests/pdo_006.phpt | 1 + ext/pdo/tests/pdo_007.phpt | 1 + ext/pdo/tests/pdo_008.phpt | 1 + ext/pdo/tests/pdo_009.phpt | 1 + ext/pdo/tests/pdo_010.phpt | 1 + ext/pdo/tests/pdo_011.phpt | 1 + ext/pdo/tests/pdo_012.phpt | 1 + ext/pdo/tests/pdo_013.phpt | 1 + ext/pdo/tests/pdo_014.phpt | 1 + ext/pdo/tests/pdo_015.phpt | 1 + ext/pdo/tests/pdo_016.phpt | 1 + ext/pdo/tests/pdo_016a.phpt | 1 + ext/pdo/tests/pdo_017.phpt | 1 + ext/pdo/tests/pdo_018.phpt | 1 + ext/pdo/tests/pdo_019.phpt | 1 + ext/pdo/tests/pdo_020.phpt | 1 + ext/pdo/tests/pdo_021.phpt | 1 + ext/pdo/tests/pdo_022.phpt | 1 + ext/pdo/tests/pdo_023.phpt | 1 + ext/pdo/tests/pdo_024.phpt | 1 + ext/pdo/tests/pdo_025.phpt | 1 + ext/pdo/tests/pdo_026.phpt | 1 + ext/pdo/tests/pdo_027.phpt | 1 + ext/pdo/tests/pdo_028.phpt | 45 ++++++++++++++++++++++++++++++++ ext/pdo/tests/pdo_test.inc | 15 +++++++++++ ext/pdo/tests/pecl_bug_5217.phpt | 1 + 31 files changed, 89 insertions(+) create mode 100644 ext/pdo/tests/pdo_028.phpt diff --git a/ext/pdo/tests/pdo_001.phpt b/ext/pdo/tests/pdo_001.phpt index a3fca65406..5129a17cec 100644 --- a/ext/pdo/tests/pdo_001.phpt +++ b/ext/pdo/tests/pdo_001.phpt @@ -10,6 +10,7 @@ PDOTest::skip(); ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- +--FILE-- +exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10), val3 VARCHAR(10))'); +$stmt = $db->prepare('INSERT INTO test values (1, ?, ?, ?)'); + +$data = array("one", "two", "three"); + +foreach ($data as $i => $v) { + $stmt->bindValue($i+1, $v); +} +$stmt->execute(); + +$stmt = $db->prepare('SELECT * from test'); +$stmt->execute(); + +var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); +?> +--EXPECT-- +array(1) { + [0]=> + array(4) { + ["id"]=> + string(1) "1" + ["val1"]=> + string(3) "one" + ["val2"]=> + string(3) "two" + ["val3"]=> + string(5) "three" + } +} diff --git a/ext/pdo/tests/pdo_test.inc b/ext/pdo/tests/pdo_test.inc index 79df2baa29..94fa9fbbfa 100644 --- a/ext/pdo/tests/pdo_test.inc +++ b/ext/pdo/tests/pdo_test.inc @@ -1,6 +1,21 @@ $v) putenv("$n=$v"); +} + class PDOTest { // create an instance of the PDO driver, based on // the current environment diff --git a/ext/pdo/tests/pecl_bug_5217.phpt b/ext/pdo/tests/pecl_bug_5217.phpt index 75df91956f..46e923ca9a 100644 --- a/ext/pdo/tests/pecl_bug_5217.phpt +++ b/ext/pdo/tests/pecl_bug_5217.phpt @@ -10,6 +10,7 @@ PDOTest::skip(); ?> --FILE--