Annotation of embedaddon/php/ext/mysqli/tests/029.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: function test: mysqli_affected_rows
3: --SKIPIF--
4: <?php
5: require_once('skipif.inc');
6: require_once('skipifconnectfailure.inc');
7: ?>
8: --FILE--
9: <?php
10: require_once("connect.inc");
11:
12: /*** test mysqli_connect 127.0.0.1 ***/
13: $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
14:
15: mysqli_select_db($link, $db);
16:
17: mysqli_query($link, "DROP TABLE IF EXISTS general_test");
18: mysqli_query($link, "CREATE TABLE general_test (a INT)");
19: mysqli_query($link, "INSERT INTO general_test VALUES (1),(2),(3)");
20:
21: $afc = mysqli_affected_rows($link);
22:
23: var_dump($afc);
24:
25: mysqli_query($link, "DROP TABLE IF EXISTS general_test");
26: mysqli_close($link);
27: print "done!";
28: ?>
29: --CLEAN--
30: <?php
31: require_once("connect.inc");
32: if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
33: printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
34:
35: if (!mysqli_query($link, "DROP TABLE IF EXISTS general_test"))
36: printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
37:
38: mysqli_close($link);
39: ?>
40: --EXPECT--
41: int(3)
42: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>