Test Failure Report for ext/pdo_odbc/tests/pdo_021.phpt ('ODBC PDO Common: PDOStatement::execute with parameters')
Script
1:
<?php 2: if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 3: require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; 4: $db = PDOTest::factory(); 5: 6: if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { 7: $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); 8: } 9: 10: $db->exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); 11: 12: $select = $db->prepare('SELECT COUNT(id) FROM test'); 13: 14: $data = array( 15: array('10', 'Abc', 'zxy'), 16: array('20', 'Def', 'wvu'), 17: array('30', 'Ghi', 'tsr'), 18: array('40', 'Jkl', 'qpo'), 19: array('50', 'Mno', 'nml'), 20: array('60', 'Pqr', 'kji'), 21: ); 22: 23: 24: // Insert using question mark placeholders 25: $stmt = $db->prepare("INSERT INTO test VALUES(?, ?, ?)"); 26: foreach ($data as $row) { 27: $stmt->execute($row); 28: } 29: $select->execute(); 30: $num = $select->fetchColumn(); 31: echo 'There are ' . $num . " rows in the table.\n"; 32: 33: // Insert using named parameters 34: $stmt2 = $db->prepare("INSERT INTO test VALUES(:first, :second, :third)"); 35: foreach ($data as $row) { 36: $stmt2->execute(array(':first'=>($row[0] + 5), ':second'=>$row[1], 37: ':third'=>$row[2])); 38: } 39: 40: $select->execute(); 41: $num = $select->fetchColumn(); 42: echo 'There are ' . $num . " rows in the table.\n"; 43: 44: 45: ?> 46:
Expected
There are 6 rows in the table.
There are 12 rows in the table.
Output
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
There are 0 rows in the table.
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
There are 0 rows in the table.
Diff
# original source file: ext/pdo/tests/pdo_021.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
002+
001- There are 6 rows in the table.
002- There are 12 rows in the table.
003+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
004+
005+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
006+
007+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
008+
009+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
010+
011+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 27
012+ There are 0 rows in the table.
013+
014+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
015+
016+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
017+
018+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
019+
020+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
021+
022+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
023+
024+ Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.1.69]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_3/ext/pdo_odbc/odbc_stmt.c:254) in /var/php_gcov/PHP_5_3/ext/pdo_odbc/tests/pdo_021.php on line 37
025+ There are 0 rows in the table.
Generated at Sun, 19 May 2013 20:27:25 +0000 (38 hours ago)
|