1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 05:32:28 +02:00
Files
archived-php-src/ext/pdo_sqlite/tests/bug_42589.phpt
Nikita Popov 39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00

23 lines
598 B
PHP

--TEST--
PDO SQLite Feature Request #42589 (getColumnMeta() should also return table name)
--EXTENSIONS--
pdo
pdo_sqlite
--FILE--
<?php
$db = new PDO("sqlite::memory:");
$db->exec('CREATE TABLE test (field1 VARCHAR(10))');
$db->exec('INSERT INTO test VALUES("test")');
$result = $db->query('SELECT * FROM test t1 LEFT JOIN test t2 ON t1.field1 = t2.field1');
$meta1 = $result->getColumnMeta(0);
$meta2 = $result->getColumnMeta(1);
var_dump(!empty($meta1['table']) && $meta1['table'] == 'test');
var_dump(!empty($meta2['table']) && $meta2['table'] == 'test');
?>
--EXPECT--
bool(true)
bool(true)