error: 1064: Invalid result set returned, You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3
SELECT COUNT(DISTINCT id) AS total FROM (SELECT v.id, job_date, v.`subject` AS `title`, (SELECT `name` FROM county WHERE id = location) AS `location`, SUBSTRING_INDEX(postcode, ' ', 1) AS postcode, small_description, refno, vacancy_type, keywords, GROUP_CONCAT(vd.`dicipline`) AS specialisms, salary_type, salary_min, salary_max, school_type FROM vacancies v LEFT JOIN vacancy_diciplines vd ON vd.`postid` = v.id WHERE active = 'Y' AND expiry_date > CURDATE() GROUP BY v.id) AS jobs WHERE ((location REGEXP 'Staffordshire' OR location REGEXP 'ST1')) AND


Function: debugInfo (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website-includes/cls/database.class.php line:152);
Function: queryReturnResultSet (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website-includes/cls/database.class.php line:128);
Function: query (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website-includes/cls/database.class.php line:116);
Function: data_row (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/cls/jobs.class.php line:174);
Function: search (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/pages/default/search-jobs.page.php line:40);
Function: include_once (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/pages/default/index.php line:63);
Function: include (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/cls/render.class.php line:33);
Function: html (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/cls/render.class.php line:129);
Function: show (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/website/startup.inc.php line:52);
Function: include_once (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/site-index.php line:30);
Function: include_once (File: /var/www/vhosts/simplyeducation.co.uk/httpdocs/index.php line:21);
Did 1 queries.
SELECT postcode FROM vacancies v INNER JOIN vacancies_county vc ON v.id = vc.`vacancy_id` LEFT JOIN county c ON vc.`county_id` = c.`id` WHERE active = 'Y' AND expiry_date >= NOW() AND `name` = 'staffordshire' GROUP BY vc.`county_id` ORDER BY c.name 0.008597