Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\pdnew\facebook-comment-status-box\index.php on line 77.
Code (PHP)
include('time.php');
$con=mysqli_connect("localhost","root","root","fbstatus");
mysqli_set_charset($con,'utf8');
$sql = mysqli_query($con,"SELECT TOP 10 * FROM comments order by comment_id desc");
while($sql2 = mysqli_fetch_assoc($sql)){
$r['comment'] = $sql2['comment'];
$ide = $sql2['comment_id'];
$text = nl2br($r['comment']);
$um = $sql2['u_nm'];
$ti = $sql2['time'];
$post = mysqli_query($con,"SELECT * FROM comments ");
$post2 = mysqli_fetch_assoc($post);
$ti1 = generate_date_today("d M Y H:i", ($ti-date('h:i:s')), "en", true);
echo "";
}
?>