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/>';
}
?>