1--TEST--
2function test: mysqli_affected_rows
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once dirname(__DIR__) . "/test_setup/test_helpers.inc";
8mysqli_check_skip_test();
9?>
10--FILE--
11<?php
12require_once dirname(__DIR__) . "/test_setup/test_helpers.inc";
13
14    $link = default_mysqli_connect();
15
16    mysqli_query($link, "CREATE TABLE test_mysqli_affected_rows (a INT)");
17    mysqli_query($link, "INSERT INTO test_mysqli_affected_rows VALUES (1),(2),(3)");
18
19    $afc = mysqli_affected_rows($link);
20
21    var_dump($afc);
22
23    mysqli_close($link);
24    print "done!";
25?>
26--CLEAN--
27<?php
28require_once dirname(__DIR__) . "/test_setup/test_helpers.inc";
29tear_down_table_on_default_connection('test_mysqli_affected_rows');
30?>
31--EXPECT--
32int(3)
33done!
34