diff options
| author | Marcus Boerger <helly@php.net> | 2005-03-10 18:48:01 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-03-10 18:48:01 +0000 |
| commit | cdb042f63272f817ecf372039d64469a99483d7a (patch) | |
| tree | 785398ddb07ed47993bca5c3130e303578ac5288 /ext/pdo_pgsql/tests | |
| parent | 92af2b61945f39e0ba4e4d4ad1d3d01a856c534e (diff) | |
| download | php-git-cdb042f63272f817ecf372039d64469a99483d7a.tar.gz | |
- Fix fetching bound vars & tests
Diffstat (limited to 'ext/pdo_pgsql/tests')
| -rwxr-xr-x | ext/pdo_pgsql/tests/pdo_016.phpt | 6 | ||||
| -rwxr-xr-x | ext/pdo_pgsql/tests/pdo_018.phpt | 18 |
2 files changed, 20 insertions, 4 deletions
diff --git a/ext/pdo_pgsql/tests/pdo_016.phpt b/ext/pdo_pgsql/tests/pdo_016.phpt index 9c41aebaea..f09290ba9b 100755 --- a/ext/pdo_pgsql/tests/pdo_016.phpt +++ b/ext/pdo_pgsql/tests/pdo_016.phpt @@ -89,7 +89,7 @@ bool(true) string(7) "String0" bool(true) bool(true) -string(1) "0" +int(0) array(1) { [1]=> string(7) "String1" @@ -99,7 +99,7 @@ bool(true) string(7) "String1" bool(true) bool(true) -string(1) "1" +int(1) array(1) { [2]=> string(7) "String2" @@ -109,7 +109,7 @@ bool(true) string(7) "String2" bool(true) bool(true) -string(1) "2" +int(2) ===REBIND/CONFLICT=== string(7) "String0" string(7) "String1" diff --git a/ext/pdo_pgsql/tests/pdo_018.phpt b/ext/pdo_pgsql/tests/pdo_018.phpt index 250bdaa4d2..6eaa66c788 100755 --- a/ext/pdo_pgsql/tests/pdo_018.phpt +++ b/ext/pdo_pgsql/tests/pdo_018.phpt @@ -10,6 +10,22 @@ require_once('skipif.inc'); require_once('connection.inc'); require_once('prepare.inc'); +require_once($PDO_TESTS . 'pdo.inc'); + +set_sql('create1', 'CREATE TABLE classtypes(id int PRIMARY KEY, name VARCHAR(20) UNIQUE)'); +set_sql('insert1', 'INSERT INTO classtypes VALUES(0, \'stdClass\')'); +set_sql('insert2', 'INSERT INTO classtypes VALUES(1, \'TestBase\')'); +set_sql('insert3', 'INSERT INTO classtypes VALUES(2, \'TestDerived\')'); +set_sql('selectC', 'SELECT COUNT(*) FROM classtypes'); +set_sql('select0', 'SELECT id, name FROM classtypes ORDER by id'); +set_sql('create2', 'CREATE TABLE test(id int PRIMARY KEY, classtype int, val VARCHAR(255))'); +set_sql('insert4', 'INSERT INTO test VALUES(:id, :classtype, :val)'); +set_sql('select1', 'SELECT id FROM classtypes WHERE name=:cname'); +set_sql('select2', 'SELECT test.val FROM test'); +set_sql('select3', 'SELECT classtypes.name AS name, test.val AS val FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id'); +set_sql('select4', 'SELECT COUNT(*) FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id WHERE (classtypes.id IS NULL OR classtypes.id > 0)'); +set_sql('select5', 'SELECT classtypes.name AS name, test.val AS val FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id WHERE (classtypes.id IS NULL OR classtypes.id > 0)'); + require_once($PDO_TESTS . 'pdo_018.inc'); ?> @@ -60,7 +76,7 @@ array(4) { ===FAILURE=== Exception:SQLSTATE[HY000]: General error: cannot unserialize class ===COUNT=== -int(3) +string(1) "3" ===DATABASE=== array(3) { [0]=> |
