add namespace support to pq\Types
[m6w6/ext-pq] / tests / bound001.phpt
1 --TEST--
2 fetch bound
3 --SKIPIF--
4 <?php include "_skipif.inc"; ?>
5 --FILE--
6 <?php
7 echo "Test\n";
8
9 include "_setup.inc";
10
11 $c = new pq\Connection(PQ_DSN);
12 $r = $c->exec("select 1*a,2*a,3*a from generate_series(2,3) a");
13 $r->bind(0, $a);
14 $r->bind(1, $b);
15 $r->bind(2, $c);
16 while ($s = $r->fetchBound()) {
17 var_dump($s,$a,$b,$c);
18 }
19 ?>
20 DONE
21 --EXPECT--
22 Test
23 array(3) {
24 [0]=>
25 &string(1) "2"
26 [1]=>
27 &string(1) "4"
28 [2]=>
29 &string(1) "6"
30 }
31 string(1) "2"
32 string(1) "4"
33 string(1) "6"
34 array(3) {
35 [0]=>
36 &string(1) "3"
37 [1]=>
38 &string(1) "6"
39 [2]=>
40 &string(1) "9"
41 }
42 string(1) "3"
43 string(1) "6"
44 string(1) "9"
45 DONE