shortysbest Posted September 24, 2010 Share Posted September 24, 2010 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\ajaxpages\attendance\student_attendance.php on line 7 <?php $i=1;?> <?php error_reporting();include("../../connect.php"); session_start(); $class_id = $_POST['class_id']; $query = mysql_query("SELECT * FROM attendance WHERE class='$class_id' ORDER BY student ASC "); while($row = mysql_fetch_array($query)) ####LINE 7<---------------------------------------- { ?> <li><div class="num"><?php print $i++?></div><?php print $row['student']; ?></li> <?php }?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 24, 2010 Share Posted September 24, 2010 Your query failed and returned a boolean FALSE. Quote Link to comment Share on other sites More sharing options...
shortysbest Posted September 24, 2010 Author Share Posted September 24, 2010 mispelled database column in database. >.< stupid mistake. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.