php mysql_query 在while里报错Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
<?php
if (mysql_num_rows($yxm) > 0) {
// 输出数据
while($yxmn = mysql_fetch_assoc($yxm)) {
$yxlist = mysql_query("select * from typecho_fields where cid='203' and name='host' limit 1");//报错行//报错行//报错行//报错行
$yxmmn = mysql_fetch_array($yxlist);
echo "<span>".$yxmn["title"]."</span><span>".$yxmmn["str_value"]."</span>";
}
} else {
echo "0 结果";
}
?>
把 报错行 放在while外面就能查询
小白在线求解答
还是自己靠谱。。。tmd 在config.php里末尾插了句mysql_close($conn);