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, 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` = WHERE active = 'Y' AND expiry_date > CURDATE() GROUP BY AS jobs WHERE ((location REGEXP 'Northamptonshire' OR location REGEXP 'NN4')) AND

Function: debugInfo (File: /var/www/vhosts/ line:152);
Function: queryReturnResultSet (File: /var/www/vhosts/ line:128);
Function: query (File: /var/www/vhosts/ line:116);
Function: data_row (File: /var/www/vhosts/ line:174);
Function: search (File: /var/www/vhosts/ line:40);
Function: include_once (File: /var/www/vhosts/ line:63);
Function: include (File: /var/www/vhosts/ line:33);
Function: html (File: /var/www/vhosts/ line:129);
Function: show (File: /var/www/vhosts/ line:52);
Function: include_once (File: /var/www/vhosts/ line:30);
Function: include_once (File: /var/www/vhosts/ line:21);
Did 1 queries.
SELECT postcode FROM vacancies v INNER JOIN vacancies_county vc ON = vc.`vacancy_id` LEFT JOIN county c ON vc.`county_id` = c.`id` WHERE active = 'Y' AND expiry_date >= NOW() AND `name` = 'northamptonshire' GROUP BY vc.`county_id` ORDER BY 0.014977