Hi,
I have 3 tables
table1 (cms_content):
id (Primary Key)
content
table2 (cms_allowed):
id (Primary Key)
pageid
userid
table3 (cms_admin):
id (Primary Key)
username
password
email
My session contains a variable $userid witch contains cms_admin.id of the current logged in user
Now, I want a recordset that contains all records from cms_content EXCEPT for the ones witch the below statement is true
cms_content.id=cms_allowed.pageid AND cms_allowed.userid='$userid'
What query should I use? I've tried with ...WHERE NOT (cms_content.id=cms_allowed.pageid AND cms_allowed.userid='$userid') but that didn't work as it is supposed to.
Please help a desperate programmer
I have 3 tables
table1 (cms_content):
id (Primary Key)
content
table2 (cms_allowed):
id (Primary Key)
pageid
userid
table3 (cms_admin):
id (Primary Key)
username
password
My session contains a variable $userid witch contains cms_admin.id of the current logged in user
Now, I want a recordset that contains all records from cms_content EXCEPT for the ones witch the below statement is true
cms_content.id=cms_allowed.pageid AND cms_allowed.userid='$userid'
What query should I use? I've tried with ...WHERE NOT (cms_content.id=cms_allowed.pageid AND cms_allowed.userid='$userid') but that didn't work as it is supposed to.
Please help a desperate programmer
