You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND field_keyword = 'event'' at line 5
SELECT val_value
FROM cms_page_fields, cms_page_field_values
WHERE val_fieldID = field_id
AND val_pageID =
AND field_keyword = 'event'
array(3) { [0]=> array(4) { ["file"]=> string(73) "/data/vhosts/platinummediagroup.co.uk/httpdocs/admin/pages/class.page.php" ["line"]=> int(309) ["function"]=> string(7) "dbQuery" ["args"]=> array(1) { [0]=> string(160) "SELECT val_value FROM cms_page_fields, cms_page_field_values WHERE val_fieldID = field_id AND val_pageID = AND field_keyword = 'event'" } } [1]=> array(7) { ["file"]=> string(72) "/data/vhosts/platinummediagroup.co.uk/httpdocs/includes/content-page.php" ["line"]=> int(27) ["function"]=> string(20) "get_custom_field_val" ["class"]=> string(4) "page" ["object"]=> object(page)#51 (32) { ["id"]=> NULL ["parent"]=> NULL ["menu"]=> NULL ["dateModified"]=> NULL ["title"]=> string(6) "Issues" ["menuTitle"]=> NULL ["slug"]=> NULL ["seo_req"]=> NULL ["pos"]=> NULL ["parentAsPage"]=> NULL ["active"]=> NULL ["showTitle"]=> NULL ["status"]=> NULL ["accesskey"]=> NULL ["maximages"]=> NULL ["uselinks"]=> NULL ["header"]=> NULL ["type"]=> NULL ["type_val"]=> NULL ["language"]=> NULL ["user_access"]=> NULL ["menuimg"]=> NULL ["menu_class"]=> NULL ["ishome"]=> NULL ["path"]=> NULL ["text"]=> NULL ["fields"]=> NULL ["links"]=> NULL ["images"]=> NULL ["leaf"]=> NULL ["trans_id"]=> NULL ["lang"]=> NULL } ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(5) "event" } } [2]=> array(4) { ["file"]=> string(56) "/data/vhosts/platinummediagroup.co.uk/httpdocs/index.php" ["line"]=> int(187) ["args"]=> array(1) { [0]=> string(72) "/data/vhosts/platinummediagroup.co.uk/httpdocs/includes/content-page.php" } ["function"]=> string(7) "include" } }