Coldwerturkey,
This is the error message I get when I tried your suggestion:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * class_list WHERE Class = 'English12')' at line 1
Here is the actual code
$query_student_display = "SELECT * FROM student_main WHERE ID IN (SELECT * class_list WHERE Class = 'English12')";
FWIW MySQL client version is 4.0.18.
Edit:
I actually want the student_main.ID to compare class_list.Stud_ID where the class = 'English12' (or whatever class I want to query)
So the field names in the two tables are different.