Annotation of embedaddon/php/ext/mysqli/tests/041.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: function test: mysqli_warning_count()
        !             3: --SKIPIF--
        !             4: <?php
        !             5: require_once('skipif.inc');
        !             6: require_once('skipifconnectfailure.inc');
        !             7: ?>
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11:        require_once("connect.inc");
        !            12: 
        !            13:        /*** test mysqli_connect 127.0.0.1 ***/
        !            14:        $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
        !            15:        mysqli_select_db($link, $db);
        !            16: 
        !            17:        mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
        !            18:        mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
        !            19: 
        !            20:        var_dump(mysqli_warning_count($link));
        !            21: 
        !            22:        mysqli_close($link);
        !            23:        print "done!";
        !            24: ?>
        !            25: --CLEAN--
        !            26: <?php
        !            27: require_once("connect.inc");
        !            28: if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
        !            29:    printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
        !            30: 
        !            31: if (!mysqli_query($link, "DROP TABLE IF EXISTS test_warnings"))
        !            32:        printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        !            33: 
        !            34: mysqli_close($link);
        !            35: ?>
        !            36: --EXPECT--
        !            37: int(1)
        !            38: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>