//数据库连接 Mysqli
$db= new Mysqli("localhost","root","root","asd_8080");
//if ( !empty(mysqli_connect_error())){
// die("连接出错");
//}
//$db->connect_error;
//echo mysqli_connect_error();
empty(mysqli_connect_error())?"":die("连接出错");
$sql = "select*from grad";
$result = $db->query($sql);
echo "<pre>";
//var_dump($result->fetch_all());//索引数组形式的所有数据
//var_dump($result->fetch_array());//索引和关联数组形式的第一条
//var_dump($result->fetch_assoc());//关联数组形式的第一条数据
//var_dump($result->fetch_object()->low);//一对象的形式的第一条数据
//var_dump($result->field_count);//统计字段数
//var_dump($result->fetch_field());
//var_dump($result->fetch_row());//索引数组形式的第一条数据
$arr=$result->fetch_all();
foreach ($arr as $x){
}