php-src/ext/mysqli/tests/037.phpt

35 lines
651 B
Plaintext
Raw Normal View History

2003-02-12 18:40:19 +08:00
--TEST--
function test: mysqli_field_count()
--FILE--
<?php
include "connect.inc";
/*** test mysqli_connect 127.0.0.1 ***/
$link = mysqli_connect("localhost", $user, $passwd);
mysqli_select_db($link, "test");
mysqli_query($link, "DROP TABLE IF EXISTS test_result");
mysqli_query($link, "CREATE TABLE test_result (a int, b varchar(10))");
mysqli_query($link, "INSERT INTO test_result VALUES (1, 'foo')");
$ir[] = mysqli_field_count($link);
mysqli_real_query($link, "SELECT * FROM test_result");
$ir[] = mysqli_field_count($link);
var_dump($ir);
mysqli_close($link);
?>
--EXPECT--
array(2) {
[0]=>
int(0)
[1]=>
int(2)
}