PHP 连接数据库
1 new mysqli(host,user,pwd,dbname);
-->query(sql);
result->fetch_assoc() || row() || object || array.
关闭资源result->close ();
关闭连接msqli-<close();
2 $con = mysqli_connec(host,usr,pwd);
$con->mysqli_select_db($con,dbname);
mysqli_query($sql,#con);
$row = mysqli_fetch_row ||assoc() || row() || object || array.
关闭资源: mysqli_free_result
关闭连接: mysqli_close ($con)
3 使用mysql_connet(); // not mysqli
mysql_query()
关闭资源:mysql_freeresult()
关闭连接:mysql_close()
5.5 以后会被移除,