Jump to content

[SOLVED] Grouping MySQL


ionik

Recommended Posts

I dont understand why this isnt working here is the sql statement

 

SELECT u.username, u.userid FROM users u, roster r WHERE u.clan_member = 1 AND u.userid <> r.userid AND catid = 1 GROUP BY u.clan_member ORDER BY u.username DESC

 

what i want this to do is select all users that have clan_member = 1, but are not allready contained in the roster table....

 

table is as follows

 

users

-------------

- username STRING

- userid PRIMARY KEY

- clan_member INT

 

roster

--------------

-userid INT

-catid INT links to roster catergories

Link to comment
https://forums.phpfreaks.com/topic/100948-solved-grouping-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.