Associate
I have two tables:
Users (User table)
Access (Access table for website access rights)
I need to select all the users from the users table that arnt in the access table.
both tables have userid has thier unique field.
I thought this would work but its coming up with errors: (When the access table is empty and when the access table has more than 1 row in it)
Any ideas?
Users (User table)
Access (Access table for website access rights)
I need to select all the users from the users table that arnt in the access table.
both tables have userid has thier unique field.
I thought this would work but its coming up with errors: (When the access table is empty and when the access table has more than 1 row in it)
PHP:
$query = mysql_query("SELECT userid, username FROM ".TABLE_PREFIX."users WHERE userid != (SELECT userid FROM ".TABLE_PREFIX."access)");
Any ideas?