summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2010-09-22 15:16:07 +0000
committerUlf Wendel <uw@php.net>2010-09-22 15:16:07 +0000
commit8236f62ce2968d027b89bf3a48e8758743994f96 (patch)
treea1b741a2a235f554ee19a35000fd8854b1617244 /ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt
parentc5fe8b72e3269fd5c05d34c6f85610f869bd3790 (diff)
downloadphp-git-8236f62ce2968d027b89bf3a48e8758743994f96.tar.gz
Test update for sql_mode = ANSI
Diffstat (limited to 'ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt')
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt
index ef85fabe6f..d0e0ffcba7 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt
@@ -38,19 +38,19 @@ MySQLPDOTest::skip();
exec_and_count(2, $db, 'DROP TABLE IF EXISTS test', 0);
exec_and_count(3, $db, sprintf('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, col1 CHAR(10)) ENGINE=%s', PDO_MYSQL_TEST_ENGINE), 0);
- exec_and_count(4, $db, 'INSERT INTO test(id, col1) VALUES (1, "a")', 1);
+ exec_and_count(4, $db, "INSERT INTO test(id, col1) VALUES (1, 'a')", 1);
// question is: will the result set be cleaned up, will it be possible to run more queries on the line?
// buffered or unbuffered does not matter!
$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
exec_and_count(5, $db, 'SELECT id FROM test', 0);
- exec_and_count(6, $db, 'INSERT INTO test(id, col1) VALUES (2, "b")', 1);
+ exec_and_count(6, $db, "INSERT INTO test(id, col1) VALUES (2, 'b')", 1);
} catch (PDOException $e) {
printf("[001] %s, [%s] %s\n",
$e->getMessage(),
$db->errorCode(), implode(' ', $db->errorInfo()));
}
-
+
print "done!";
?>
--CLEAN--
@@ -61,5 +61,5 @@ $db = MySQLPDOTest::factory();
?>
--EXPECTF--
Warning: PDO::exec(): SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in %s on line %d
-[006] Expecting '1'/integer got ''/boolean when running 'INSERT INTO test(id, col1) VALUES (2, "b")', [HY000] HY000 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
+[006] Expecting '1'/integer got ''/boolean when running 'INSERT INTO test(id, col1) VALUES (2, 'b')', [HY000] HY000 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
done! \ No newline at end of file