连接数据库:
$conn=musqli_connnect("127.0.0.1","user","password","db_name";
$conn=mysqli_connect("adder","user","password");
选择数据库:
Mysqli_select_db($conn,"db_namae"); 这是在上面没有直接选择连接数据而使用
执行SQL语句:
$result=mysqli_query($conn,“SQL”);
遍历查询结果:
$row=mysqli_fetch_row(); 返回一行
$table=mysqli_fetch_all(); 返回全部内容(一个表)
$row=mysqli_fetch_array($result);
关闭数据库连接:
Mysqli_close($conn)
@:屏蔽报错