]> granicus.if.org Git - php/commitdiff
Make sure we get a WARNING and not an ERROR here :)
authorfoobar <sniper@php.net>
Fri, 8 Jul 2005 08:53:25 +0000 (08:53 +0000)
committerfoobar <sniper@php.net>
Fri, 8 Jul 2005 08:53:25 +0000 (08:53 +0000)
ext/mysqli/tests/041.phpt

index d6a9f954d08b40f8c7ee5f600275c8e69910e721..90bed1ad49ad86521256f65de484faf3f900528f 100644 (file)
@@ -9,16 +9,12 @@ function test: mysqli_warning_count()
        
        /*** test mysqli_connect 127.0.0.1 ***/
        $link = mysqli_connect($host, $user, $passwd);
-
        mysqli_select_db($link, "test");
 
+       mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
        mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
 
-       mysqli_query($link, "CREATE TABLE test_warnings (a int not null");
-       mysqli_query($link, "INSERT INTO test_warnings VALUES (NULL)");
-
-       $num = mysqli_warning_count($link);
-       var_dump($num);
+       var_dump(mysqli_warning_count($link));
 
        mysqli_close($link);
 ?>