关于Deprecated: mysql_result: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in


require_once('connect.php');

$sql = "select * from introduce";

\(query = mysql_query(\)sql);

if(\(query&&mysql_num_rows(\)query)){

\(row = mysql_fetch_row(\)query);

$contact = $row[1];

}


改为

include_once('connect.php');

$sql = "select * from introduce";

\(query = mysqli_query(\)con,\(sql); if(\)query&&mysqli_num_rows($query)){

\(row = mysqli_fetch_row(\)query);

$contact = $row[1];

}

上一篇:mysql数据库,取两列值中最大的一个值


下一篇:第3章 jQuery的DOM操作