Page 1 of 1

Query Cookie within MySQL?

Posted: Tue May 04, 2010 6:05 am
by simonmlewis
$result = mysql_query ("SELECT DISTINCT website FROM support WHERE dateactioned is NULL AND controller = '$cookiewebsite' OR $cookiewebsite = 'ADMIN' AND user = 'yes' ORDER BY website ASC");
This errors. I need to query to see who controls the entry in the database, but to override it if the logged in person is an ADMIN person.

I thought this script would say to select from the table where the Controller is "website name" OR the cookie's web site states "ADMIN".

Can you not query a cookie within a query like this?