mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
35 lines
651 B
Plaintext
35 lines
651 B
Plaintext
|
--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)
|
||
|
}
|