4 <?php include "_skipif.inc"; ?>
11 $c = new pq\Connection(PQ_DSN);
12 $r = $c->exec("select (ARRAY['one','two','three','four','five','six','seven','eight','nine','ten'])[a] num, ".
13 "round(log(a)::numeric,3) log, round(exp(a)::numeric,3) exp from generate_series(1,10) a");
14 $r->fetchType = pq\Result::FETCH_OBJECT;
17 var_dump($r->map() == $r->map(0));
18 var_dump($r->map() == $r->map(0, array(0,1,2)));
20 $r = $c->exec("select * from generate_series(0,1) a, generate_series(0,1) b, generate_series(0,1) c, generate_series(0,1) d ".
22 $r->fetchType = pq\Result::FETCH_ARRAY;
23 var_dump($r->map(array(0,"b",2), "d"));
29 object(stdClass)#%d (10) {
31 object(stdClass)#%d (3) {
40 object(stdClass)#%d (3) {
49 object(stdClass)#%d (3) {
58 object(stdClass)#%d (3) {
67 object(stdClass)#%d (3) {
76 object(stdClass)#%d (3) {
85 object(stdClass)#%d (3) {
94 object(stdClass)#%d (3) {
103 object(stdClass)#%d (3) {
112 object(stdClass)#%d (3) {
118 string(9) "22026.466"