summaryrefslogtreecommitdiff
path: root/ext/mysqli
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2007-12-28 15:27:38 +0000
committerUlf Wendel <uw@php.net>2007-12-28 15:27:38 +0000
commitafa5602456099601098930d1a0508d831905cdbc (patch)
treec896fa1532700722b78553152099df457fc4eded /ext/mysqli
parent3ca72e6a794722d23985b0eb85e35af1210fcd28 (diff)
downloadphp-git-afa5602456099601098930d1a0508d831905cdbc.tar.gz
Fixing SQL syntax in this very old test to make it pass with MySQL 6.0
Diffstat (limited to 'ext/mysqli')
-rw-r--r--ext/mysqli/tests/020.phpt21
1 files changed, 17 insertions, 4 deletions
diff --git a/ext/mysqli/tests/020.phpt b/ext/mysqli/tests/020.phpt
index ac3434bf5e..4399391abe 100644
--- a/ext/mysqli/tests/020.phpt
+++ b/ext/mysqli/tests/020.phpt
@@ -1,8 +1,8 @@
--TEST--
mysqli bind_param/bind_result date
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
@@ -20,13 +20,26 @@ require_once('skipifconnectfailure.inc');
mysqli_query($link, "SET sql_mode=''");
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
- mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time,
+
+ $rc = @mysqli_query($link,"CREATE TABLE test_bind_result(
+ c1 date,
+ c2 time,
c3 timestamp(14),
c4 year,
c5 datetime,
c6 timestamp(4),
c7 timestamp(6))");
+ if (!$rc)
+ $rc = mysqli_query($link,"CREATE TABLE test_bind_result(
+ c1 date,
+ c2 time,
+ c3 timestamp,
+ c4 year,
+ c5 datetime,
+ c6 timestamp,
+ c7 timestamp)");
+
$stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "sssssss", $d1, $d2, $d3, $d4, $d5, $d6, $d7);
@@ -41,7 +54,7 @@ require_once('skipifconnectfailure.inc');
mysqli_execute($stmt);
mysqli_stmt_close($stmt);
- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result");
+ $stmt = mysqli_prepare($link, "SELECT c1, c2, c3, c4, c5, c6, c7 FROM test_bind_result");
mysqli_bind_result($stmt,$c1, $c2, $c3, $c4, $c5, $c6, $c7);