$mysqli = new mysqli("localhost","root","","bbs");
$mysqli->set_charset("utf8");
$sql="select * from news";
$mysqli->real_query($sql);
$result=$mysqli->store_result();
print("++++++++++++++++++++++++++++++\n");
$result->field_seek(1);
while($field=$result->fetch_field())
{
var_dump($field);
}
print("++++++++++++++++++++++++++++++\n");
var_dump(get_class_vars(get_class($result)));
var_dump(get_class_methods(get_class($result)));
$result->data_seek(1);
$row=$result->fetch_row();
var_dump($row);//用于移动,可以以索引的方式来查找第N条记录
while($row=$result->fetch_row())
{
var_dump($row);
}
$filed=$result->fetch_field();
var_dump($filed);
while($field=$result->fetch_field())
{
var_dump($field);
}
$fields = $result->fetch_fields();
var_dump($fields);
$field=$result->fetch_field_direct(2);
var_dump($field);
$fetch = $result->fetch_all();
var_dump($fetch);