Annotation of embedaddon/php/ext/pdo_mysql/tests/pdo_mysql_attr_fetch_table_names.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: PDO::ATTR_FETCH_TABLE_NAMES
3: --SKIPIF--
4: <?php
5: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
6: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
7: MySQLPDOTest::skip();
8: ?>
9: --FILE--
10: <?php
11: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
12: $db = MySQLPDOTest::factory();
13: MySQLPDOTest::createTestTable($db);
14:
15: $db->setAttribute(PDO::ATTR_FETCH_TABLE_NAMES, 1);
16: $stmt = $db->query('SELECT label FROM test LIMIT 1');
17: var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
18: $stmt->closeCursor();
19:
20: $db->setAttribute(PDO::ATTR_FETCH_TABLE_NAMES, 0);
21: $stmt = $db->query('SELECT label FROM test LIMIT 1');
22: var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
23: $stmt->closeCursor();
24:
25: print "done!";
26: ?>
27: --EXPECTF--
28: array(1) {
29: [0]=>
30: array(1) {
31: [%u|b%"test.label"]=>
32: %unicode|string%(1) "a"
33: }
34: }
35: array(1) {
36: [0]=>
37: array(1) {
38: [%u|b%"label"]=>
39: %unicode|string%(1) "a"
40: }
41: }
42: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>