Skip to content

Commit

Permalink
nested {}-blocks bugfix
Browse files Browse the repository at this point in the history
git-svn-id: svn://dklab.ru/lib/DbSimple/trunk@204 78bb956b-1e24-0410-b8d0-c528fdc9eae3
  • Loading branch information
dk committed Jul 2, 2007
1 parent 088a7cd commit 05465c1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/DbSimple/Generic/070_nested_blocks.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
Generic: nested {}-blocks usage
--FILE--
<?php
require_once dirname(__FILE__) . '/../init.php';

function main(&$DB)
{
@$DB->query("SELECT * FROM t1 WHERE 1 { AND a = ?d } AND c = ?d", 1, 3);
@$DB->query("SELECT * FROM t1 WHERE 1 { AND a = ?d } AND c = ?d", DBSIMPLE_SKIP, 3);
@$DB->query("SELECT * FROM t1 WHERE 1 { AND a = ?d { AND b=?d } } AND c = ?d", 1, 2, 3);
@$DB->query("SELECT * FROM t1 WHERE 1 { AND a = ?d { AND b=?d } } AND c = ?d", 1, DBSIMPLE_SKIP, 3);
@$DB->query("SELECT * FROM t1 WHERE 1 { AND a = ?d { AND b=?d } } AND c = ?d", DBSIMPLE_SKIP, 2, 3);
}

?>
--EXPECT--
Query: 'SELECT * FROM t1 WHERE 1 AND a = 1 AND c = 3'
Query: 'SELECT * FROM t1 WHERE 1 AND c = 3'
Query: 'SELECT * FROM t1 WHERE 1 AND a = 1 AND b=2 AND c = 3'
Query: 'SELECT * FROM t1 WHERE 1 AND a = 1 AND c = 3'
Query: 'SELECT * FROM t1 WHERE 1 AND c = 3'

0 comments on commit 05465c1

Please sign in to comment.