$con = mysqli_connect(
‘127.0.0.1‘, /* The host to connect to 连接MySQL地址 */
‘root‘, /* The user to connect as 连接MySQL用户名 */
‘root‘, /* The password to use 连接MySQL密码 */
‘mydbname‘); /* The default database to query 连接数据库名称*/
$result = mysqli_query($con,$sql);
$row = mysqli_fetch_array($result));
以上就是全新的连接方法
mysql_select_db已经不再需要
时间: 2024-11-07 20:38:27