Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\administrator\admin\schedule.php on line 187
admin/schedule.php
//LOAD CLASS LIST
$sqlstr = "SELECT * FROM class_list
INNER JOIN `group`
ON class_list.group_id = `group`.group_id
INNER JOIN teacher
ON class_list.teach_id = teacher.teach_id
INNER JOIN class
ON class_list.class_id = class.class_id
WHERE datetime > '".date('Y-m-d H:i:s')."' ORDER BY class_list_id";
//Create a PS_Pagination object
$pager = new PS_Pagination($conn,$sqlstr,5,10);
//The paginate() function returns a mysql result set
$result = $pager->paginate();
?>
<table id="admintable" border="1" cellpadding="2" cellspacing="0" style="width: 900px;">
<tr>
<th>Next Class List</th><th>Attendance List</th><th>Teacher</th><th>Material</th><th>Short Intro</th><th>datetime</th><th>Post</th>
</tr>
<?php
$i=0;
while ($data = mysql_fetch_array($result)){
--------------Line 187: while ($data = mysql_fetch_array($result)){
How to fix the error?