Annotation of embedaddon/php/ext/mysqli/tests/017.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: mysqli fetch functions
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifemb.inc');
! 7: require_once('skipifconnectfailure.inc');
! 8: ?>
! 9: --FILE--
! 10: <?php
! 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:
! 16: if (!$stmt = mysqli_prepare($link, "SELECT md5('bar'), database(), 'foo'"))
! 17: printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
! 18:
! 19: mysqli_stmt_bind_result($stmt, $c0, $c1, $c2);
! 20: mysqli_stmt_execute($stmt);
! 21:
! 22: mysqli_stmt_fetch($stmt);
! 23: mysqli_stmt_close($stmt);
! 24:
! 25: $test = array($c0, $c1, $c2);
! 26: if ($c1 !== $db) {
! 27: echo "Different data\n";
! 28: }
! 29:
! 30: var_dump($test);
! 31: mysqli_close($link);
! 32: print "done!";
! 33: ?>
! 34: --EXPECTF--
! 35: array(3) {
! 36: [0]=>
! 37: string(32) "37b51d194a7513e45b56f6524f2d51f2"
! 38: [1]=>
! 39: %unicode|string%(%d) "%s"
! 40: [2]=>
! 41: %unicode|string%(3) "foo"
! 42: }
! 43: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>