Mysql eliminate user based on conditions
I asked this last week over the weekend and it got buried in the archives before anyone could answer. So forgive me if you've already seen this. 

I teach classes and want to be able to select those students who have taken one class, but not another class. I have two tables: lessons_slots which is the table for every class such as:

<blockquote>
--------------------<br>
-ID   name     slots-<br>
-1    basics   10   -<br>
-2    advanced 10   -<br>
-3    basics   10   -<br>
---------------------
</blockquote>

The other table is class_roll, which holds enrollment info, such as:

<blockquote>
--------------------<br>
-sID   classid     firstname    lastname-<br>
-1     1           Jo           Schmo<br>
-2     1           Person       Two<br>
...<br>
-13    2           Jo           Schmo<br>
---------------------
</blockquote>
What I want to do, I select everyone who has not had the advanced class (for example). I've tried doing

<blockquote>
SELECT * <br>
FROM lessons_slots <br>
LEFT JOIN class_roll<br>
ON lessons_slots.ID = class_roll.classid<br>
WHERE lessons_slots.name != 'advanced'

</blockquote>

But that doesn't work...All it does is eliminate that row, without eliminating the user. I want Jo Schmo, for example, to not show up in the results. Any ideas?

Mysql eliminate user based on conditions
===

I asked this last week over the weekend and it got buried in the archives before anyone could answer. So forgive me if you've already seen this. 

I teach classes and want to be able to select those students who have taken one class, but not another class. I have two tables: lessons_slots which is the table for every class such as:

<blockquote>
--------------------<br>
-ID   name     slots-<br>
-1    basics   10   -<br>
-2    advanced 10   -<br>
-3    basics   10   -<br>
---------------------
</blockquote>

The other table is class_roll, which holds enrollment info, such as:

<blockquote>
--------------------<br>
-sID   classid     firstname    lastname-<br>
-1     1           Jo           Schmo<br>
-2     1           Person       Two<br>
...<br>
-13    2           Jo           Schmo<br>
---------------------
</blockquote>
What I want to do, I select everyone who has not had the advanced class (for example). I've tried doing

<blockquote>
SELECT * <br>
FROM lessons_slots <br>
LEFT JOIN class_roll<br>
ON lessons_slots.ID = class_roll.classid<br>
WHERE lessons_slots.name != 'advanced'

</blockquote>

But that doesn't work...All it does is eliminate that row, without eliminating the user. I want Jo Schmo, for example, to not show up in the results. Any ideas?
