two tables not equal            
<p>I have a SQL query and here it is the part I'm stuck on.</p>

<pre><code>$query = "SELECT DISTINCT user.firstname, user.lastname, user.userid FROM user, staff WHERE user.type = 'Staff' AND staff.userid!= user.userid";
</code></pre>

<p>For some reason, it only prints out the part where users are staff but the != is not working, where as if I remove the ! and only have staff.user_id = user.user_id it works and prints out all users that are in both of those tables?</p>

<p>Can someone please explain why is this is happen and have a solution.</p>

<p>EDIT</p>

<pre><code>TABLE USER                       TABLE STAFF
ID - NAME - TYPE                ID   -     NUMBER
1  - A    - Staff               1    -      11111
2  - B    - Staff               2    -      22222
3  - C    - Customer
4  - D    - Customer
5  - E    - Staff
6  - F    - Staff
</code></pre>

<p>How would I find the users id 5 and 6?</p>
