uw              Fri Dec 28 15:27:38 2007 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/mysqli/tests   020.phpt 
  Log:
  Fixing SQL syntax in this very old test to make it pass with MySQL 6.0
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/020.phpt?r1=1.6.2.1.4.1&r2=1.6.2.1.4.2&diff_format=u
Index: php-src/ext/mysqli/tests/020.phpt
diff -u php-src/ext/mysqli/tests/020.phpt:1.6.2.1.4.1 
php-src/ext/mysqli/tests/020.phpt:1.6.2.1.4.2
--- php-src/ext/mysqli/tests/020.phpt:1.6.2.1.4.1       Wed Oct 10 10:07:46 2007
+++ php-src/ext/mysqli/tests/020.phpt   Fri Dec 28 15:27:38 2007
@@ -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 @@
        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 @@
        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);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to