PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_odbc/tests/pdo_031.phpt ('ODBC PDO Common: PDOStatement SPL iterator')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4: if (!
class_exists('RecursiveTreeIterator'false)) require_once(getenv('REDIR_TEST_DIR').'../../spl/examples/recursivetreeiterator.inc'); 
5:
6:
$data = array(
7:     array(
'10''Abc''zxy'),
8:     array(
'20''Def''wvu'),
9:     array(
'30''Ghi''tsr'),
10: );
11:
12:
$db PDOTest::factory();
13:
14:
$db->exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))');
15:
16:
$stmt $db->prepare("INSERT INTO test VALUES(?, ?, ?)");
17: foreach (
$data as $row) {
18:     
$stmt->execute($row);
19: }
20:
21: unset(
$stmt);
22:
23: echo 
"===QUERY===\n";
24:
25:
$stmt $db->query('SELECT * FROM test');
26:
27: foreach(new 
RecursiveTreeIterator(new RecursiveArrayIterator($stmt->fetchAll(PDO::FETCH_ASSOC)), RecursiveTreeIterator::BYPASS_KEY) as $c=>$v)
28: {
29:     echo 
"$v [$c]\n";
30: }
31:
32: echo 
"===DONE===\n";
33: exit(
0);
34:
?>
35:

Expected

===QUERY===
|-Array [0]
| |-10 [id]
| |-Abc [val]
| \-zxy [val2]
|-Array [1]
| |-20 [id]
| |-Def [val]
| \-wvu [val2]
\-Array [2]
  |-30 [id]
  |-Ghi [val]
  \-tsr [val2]
===DONE===

Output

Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18

Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18

Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18
===QUERY===
===DONE===

Diff

# original source file: ext/pdo/tests/pdo_031.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18
002+ 
003+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18
004+ 
005+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.73]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , )' at line 1 (SQLExecute[1064] at /var/php_gcov/PHP_5_5/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_5/ext/pdo_odbc/tests/pdo_031.php on line 18
002- |-Array [0]
007+ ===DONE===
003- | |-10 [id]
004- | |-Abc [val]
005- | \-zxy [val2]
006- |-Array [1]
007- | |-20 [id]
008- | |-Def [val]
009- | \-wvu [val2]
010- \-Array [2]
011-   |-30 [id]
012-   |-Ghi [val]
013-   \-tsr [val2]
014- ===DONE===

 

Generated at Tue, 22 Apr 2014 03:58:31 +0000 (39 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.