1--TEST-- 2PDO_mysql subclass basic 3--EXTENSIONS-- 4pdo_mysql 5--SKIPIF-- 6<?php 7require_once __DIR__ . '/inc/mysql_pdo_test.inc'; 8MySQLPDOTest::skip(); 9?> 10--FILE-- 11<?php 12 13require_once __DIR__ . '/inc/mysql_pdo_test.inc'; 14 15$db = MySQLPDOTest::factory(Pdo\Mysql::class); 16 17$db->query('CREATE TABLE pdomysql_001 (id INT, name TEXT)'); 18 19$db->query('INSERT INTO pdomysql_001 VALUES (NULL, "PHP")'); 20$db->query('INSERT INTO pdomysql_001 VALUES (NULL, "PHP6")'); 21 22foreach ($db->query('SELECT name FROM pdomysql_001') as $row) { 23 var_dump($row); 24} 25 26echo "Fin."; 27?> 28--CLEAN-- 29<?php 30require_once __DIR__ . '/inc/mysql_pdo_test.inc'; 31$db = MySQLPDOTest::factory(); 32$db->exec('DROP TABLE IF EXISTS pdomysql_001'); 33?> 34--EXPECT-- 35array(2) { 36 ["name"]=> 37 string(3) "PHP" 38 [0]=> 39 string(3) "PHP" 40} 41array(2) { 42 ["name"]=> 43 string(4) "PHP6" 44 [0]=> 45 string(4) "PHP6" 46} 47Fin. 48