As per
$query = mysql_query("SELECT * FROM `pages`
WHERE parent_id = '0'
AND menu_location NOT IN (main,footer)");
I’m trying to select all pages from database table where the parent id is 0 and the page is not in the main menu or footer menu, so I want to select all apart from if these pages are set to either of these menus.
There are multiple menu_location types so I don’t believe I can use NOT NULL for example.
I’ve got a feeling I’m probably use the NOT IN statement out of context, but if anyone could kindly point me in the right direction on how to query the database properly, I would be very grateful.
EDIT.
Table: 'pages'
Table Columns: 'active', 'page_id', 'parent_id', 'order', 'site_id',
'page_name', 'page_display_name', 'page_location', 'page_type',
'menu_location'
(there are other columns but mainly for content, metadata etc).
I just simply want to select all pages from table apart from those which have main and footer in the menu_location column. Thanks
Just surround main ad footer values with
'':