xref: /PHP-5.3/ext/sqlite/tests/sqlite_oo_011.phpt (revision 610c7fbe)
1--TEST--
2sqlite-oo: returned associative column names
3--INI--
4sqlite.assoc_case=0
5--SKIPIF--
6<?php # vim:ft=php
7if (!extension_loaded("sqlite")) print "skip"; ?>
8--FILE--
9<?php
10include "blankdb_oo.inc";
11
12$db->query("CREATE TABLE foo (c1 char, c2 char, c3 char)");
13$db->query("CREATE TABLE bar (c1 char, c2 char, c3 char)");
14$db->query("INSERT INTO foo VALUES ('1', '2', '3')");
15$db->query("INSERT INTO bar VALUES ('4', '5', '6')");
16$r = $db->query("SELECT * from foo, bar", SQLITE_ASSOC);
17var_dump($r->fetch());
18?>
19--EXPECT--
20array(6) {
21  ["foo.c1"]=>
22  string(1) "1"
23  ["foo.c2"]=>
24  string(1) "2"
25  ["foo.c3"]=>
26  string(1) "3"
27  ["bar.c1"]=>
28  string(1) "4"
29  ["bar.c2"]=>
30  string(1) "5"
31  ["bar.c3"]=>
32  string(1) "6"
33}
34