问答详情
源自:3-3 获取分页数据

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /Library/WebServer/Documents/apms/mypage.php on line 6

<?php
require_once('connect.php');
$page=$_GET['p'];
$sql="select * from article LIMIT"  .($page-1)*2  .",2";
$result=mysqli_query($con,$sql);
while($row=mysqli_fetch_assoc($result)) {
echo $row['id'].'-'.$row['title'].'<br/>';
}
?>

提问者:晴天小猪猪 2016-03-18 17:22

个回答

  • 晴天小猪猪
    2016-03-18 17:37:01

    找到错误了