- 21 Jun 2012, 00:54
#1532
Interesting, I come on after a year due to the project taking off and I find an interesting glitch as it were. The Important Candidates on the dashboard returns a an error which you can view below. Funny thing is it was working not a second ago and I haven't changed anything in the code or database. In fact, when I tested the code on a separate CATS (clean install) it worked. Now here's where freaky things happen. When I reverted the clean install to default code the dashboard returned the same type of error. I checked the database and none of the fields have changed. I have not messed with any of the default coding yet the error appears. Anyone got any ideas as to why or should I resign myself to the glitch and just be prepared to reinstall CATS whenever the error pops up? Error below is based off the clean install. The red highlight is the same on both the expanded version and the clean version.
MySQL Query Failed: 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 ') AS submitted,
CONCAT(
candidate.first_name' at line 52
SELECT
candidate.candidate_id AS candidateID,
candidate.is_active AS isActive,
candidate.first_name AS firstName,
candidate.middle_name AS middleName,
candidate.last_name AS lastName,
candidate.email1 AS email1,
candidate.email2 AS email2,
candidate.phone_home AS phoneHome,
candidate.phone_work AS phoneWork,
candidate.phone_cell AS phoneCell,
candidate.address AS address,
candidate.city AS city,
candidate.state AS state,
candidate.zip AS zip,
candidate.source AS source,
candidate.key_skills AS keySkills,
DATE_FORMAT(
candidate.date_available, '%Y-%m-%d'
) AS dateAvailable,
candidate.current_employer AS currentEmployer,
candidate.current_pay AS currentPay,
candidate.desired_pay AS desiredPay,
candidate.notes AS notes,
candidate.owner AS owner,
candidate.can_relocate AS canRelocate,
candidate.web_site AS webSite,
candidate.best_time_to_call AS bestTimeToCall,
candidate.is_hot AS isHot,
candidate.is_admin_hidden AS isAdminHidden,
DATE_FORMAT(
candidate.date_created, '%m-%d-%y (%h:%i %p)'
) AS dateCreated,
DATE_FORMAT(
candidate.date_modified, '%m-%d-%y (%h:%i %p)'
) AS dateModified,
COUNT(
candidate_joborder.joborder_id
) AS pipeline,
(
SELECT
COUNT(*)
FROM
candidate_joborder_status_history
WHERE
candidate_id = 0
AND
status_to = 400
AND
site_id =
) AS submitted,
CONCAT(
candidate.first_name, ' ', candidate.last_name
) AS candidateFullName,
CONCAT(
entered_by_user.first_name, ' ', entered_by_user.last_name
) AS enteredByFullName,
CONCAT(
owner_user.first_name, ' ', owner_user.last_name
) AS ownerFullName,
owner_user.email AS owner_email,
eeo_ethnic_type.type AS eeoEthnicType,
eeo_veteran_type.type AS eeoVeteranType,
candidate.eeo_disability_status AS eeoDisabilityStatus,
candidate.eeo_gender AS eeoGender,
IF (candidate.eeo_gender = 'm',
'Male',
IF (candidate.eeo_gender = 'f',
'Female',
''))
AS eeoGenderText
FROM
candidate
LEFT JOIN user AS entered_by_user
ON candidate.entered_by = entered_by_user.user_id
LEFT JOIN user AS owner_user
ON candidate.owner = owner_user.user_id
LEFT JOIN candidate_joborder
ON candidate.candidate_id = candidate_joborder.candidate_id
LEFT JOIN eeo_ethnic_type
ON eeo_ethnic_type.eeo_ethnic_type_id = candidate.eeo_ethnic_type_id
LEFT JOIN eeo_veteran_type
ON eeo_veteran_type.eeo_veteran_type_id = candidate.eeo_veteran_type_id
WHERE
candidate.candidate_id = 0
AND
candidate.site_id =
GROUP BY
candidate.candidate_id
MySQL Query Failed: 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 ') AS submitted,
CONCAT(
candidate.first_name' at line 52
SELECT
candidate.candidate_id AS candidateID,
candidate.is_active AS isActive,
candidate.first_name AS firstName,
candidate.middle_name AS middleName,
candidate.last_name AS lastName,
candidate.email1 AS email1,
candidate.email2 AS email2,
candidate.phone_home AS phoneHome,
candidate.phone_work AS phoneWork,
candidate.phone_cell AS phoneCell,
candidate.address AS address,
candidate.city AS city,
candidate.state AS state,
candidate.zip AS zip,
candidate.source AS source,
candidate.key_skills AS keySkills,
DATE_FORMAT(
candidate.date_available, '%Y-%m-%d'
) AS dateAvailable,
candidate.current_employer AS currentEmployer,
candidate.current_pay AS currentPay,
candidate.desired_pay AS desiredPay,
candidate.notes AS notes,
candidate.owner AS owner,
candidate.can_relocate AS canRelocate,
candidate.web_site AS webSite,
candidate.best_time_to_call AS bestTimeToCall,
candidate.is_hot AS isHot,
candidate.is_admin_hidden AS isAdminHidden,
DATE_FORMAT(
candidate.date_created, '%m-%d-%y (%h:%i %p)'
) AS dateCreated,
DATE_FORMAT(
candidate.date_modified, '%m-%d-%y (%h:%i %p)'
) AS dateModified,
COUNT(
candidate_joborder.joborder_id
) AS pipeline,
(
SELECT
COUNT(*)
FROM
candidate_joborder_status_history
WHERE
candidate_id = 0
AND
status_to = 400
AND
site_id =
) AS submitted,
CONCAT(
candidate.first_name, ' ', candidate.last_name
) AS candidateFullName,
CONCAT(
entered_by_user.first_name, ' ', entered_by_user.last_name
) AS enteredByFullName,
CONCAT(
owner_user.first_name, ' ', owner_user.last_name
) AS ownerFullName,
owner_user.email AS owner_email,
eeo_ethnic_type.type AS eeoEthnicType,
eeo_veteran_type.type AS eeoVeteranType,
candidate.eeo_disability_status AS eeoDisabilityStatus,
candidate.eeo_gender AS eeoGender,
IF (candidate.eeo_gender = 'm',
'Male',
IF (candidate.eeo_gender = 'f',
'Female',
''))
AS eeoGenderText
FROM
candidate
LEFT JOIN user AS entered_by_user
ON candidate.entered_by = entered_by_user.user_id
LEFT JOIN user AS owner_user
ON candidate.owner = owner_user.user_id
LEFT JOIN candidate_joborder
ON candidate.candidate_id = candidate_joborder.candidate_id
LEFT JOIN eeo_ethnic_type
ON eeo_ethnic_type.eeo_ethnic_type_id = candidate.eeo_ethnic_type_id
LEFT JOIN eeo_veteran_type
ON eeo_veteran_type.eeo_veteran_type_id = candidate.eeo_veteran_type_id
WHERE
candidate.candidate_id = 0
AND
candidate.site_id =
GROUP BY
candidate.candidate_id