query($query);
//was it an okay query? you can use $result->error to look at the precise error that php gives
if(!$result) {
echo "
bad query - looking at all attending
";
}
else {
echo "
There are " . $result->num_rows . " Student-Class pairs in Attending
";
}
//make an html table - for each row, print out that student id and class id
//admittedly, this table really doesnt tell us much, but it lists everything
//in the attending table accurately.
echo "
Student_ID | Class_ID |
---|---|
" . $row['Student_ID'] . " | "; echo "" . $row['Class_ID'] . " | "; echo "