Page 1 of 1

Query Error -- Report to System Administrator ASAP

Posted: 06 Mar 2016, 08:34
by yongfei387
Query Error -- Report to System Administrator ASAP

MySQL Query Failed: Table '. \ Opencart \ JobOrder is labeled' crashed 'and should be repaired

SELECT
candidate.first_name as firstName,
candidate.last_name as lastName,
candidate.candidate_id as candidateID,
company.name as companyName,
company.company_id as companyID,
user.first_name as userFirstName,
user.last_name as userLastName,
IF (company.is_hot = 1, 'jobLinkHot', 'jobLinkCold') as companyClassName,
IF (candidate.is_hot = 1, 'jobLinkHot', 'jobLinkCold') as candidateClassName,
DATE_FORMAT(
candidate_joborder_status_history.date, '%d-%m-%y'
) AS date,
candidate_joborder_status_history.date AS datesort
FROM
candidate_joborder_status_history
LEFT JOIN candidate ON
candidate.candidate_id = candidate_joborder_status_history.candidate_id
LEFT JOIN joborder ON
joborder.joborder_id = candidate_joborder_status_history.joborder_id
LEFT JOIN company ON
joborder.company_id = company.company_id
LEFT JOIN user ON
joborder.recruiter = user.user_id
WHERE
status_to = 800
AND
candidate_joborder_status_history.site_id = 1
ORDER BY
datesort DESC
LIMIT
10

Re: Query Error -- Report to System Administrator ASAP

Posted: 06 Mar 2016, 20:49
by manuel
Please before you post a problem..

what version of OpenCATS are you running?
what platform are you running it on (WAMP/LAMP)

does your OpenCATS run on a Dedicated server, VPS, or shared?

Have you checked your error logs for your webserver? Do they tell you anything useful? Post them!
can you reproduce your error?

have you searched the site to see if it's already reported?

Have you checked the Bug tracker to see if it's in there (oops still to implement that one :-o )

Re: Query Error -- Report to System Administrator ASAP

Posted: 09 May 2016, 15:08
by RussH
Hey there,

if your MySQL database is showing as crashed, I guess you had a power outage (or similar) whilst it was in use?

Anyway - you need to drop to a command line (possibly PhpMyAdmin can do this too, don't know) and use the myisamchk command to repair your database.

Re: Query Error -- Report to System Administrator ASAP

Posted: 06 Jun 2018, 14:31
by jost
Hello
I have installed the actual version of Open Cat 0.9.4 Countach downloades today.
its installed on a virtual server with Ubuntu 16.04.4 LTS‬
here are the system informations out of openCATS:

General Information
Operating System: Linux hptc.eu 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64
Operating System Type: CATS thinks your operating system is UNIX.
PHP Version: 5.6.36
Database Version: MySQL 5.7.22-0ubuntu0.16.04.1 [/i]


within the installation everything went fine, but when i click on job orders, candidates or companies I'll get the following message (job order):


Query Error -- Report to System Administrator ASAP
MySQL Query Failed: Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'opencatisb.attachment.attachment_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT SQL_CALC_FOUND_ROWS
joborder.joborder_id AS jobOrderID,
joborder.joborder_id AS exportID,
joborder.date_modified AS dateModifiedSort,
joborder.date_created AS dateCreatedSort,
joborder.is_hot AS isHot,
IF(attachment_id, 1, 0) AS attachmentPresent,
joborder.title AS title,
company.name AS companyName,
company.company_id AS companyID,
joborder.type AS type,
joborder.status AS status,
DATE_FORMAT(joborder.date_created, '%d-%m-%y') AS dateCreated,
DATEDIFF(NOW(), joborder.date_created) AS daysOld,
(
SELECT
COUNT(*)
FROM
candidate_joborder_status_history
WHERE
joborder_id = joborder.joborder_id
AND
status_to = 400
AND
site_id = 1
) AS submitted,
(
SELECT
COUNT(*)
FROM
candidate_joborder
WHERE
joborder_id = joborder.joborder_id
AND
site_id = 1
) AS pipeline,
recruiter_user.first_name AS recruiterFirstName,recruiter_user.last_name AS recruiterLastName,CONCAT(recruiter_user.last_name, recruiter_user.first_name) AS recruiterSort,
owner_user.first_name AS ownerFirstName,owner_user.last_name AS ownerLastName,CONCAT(owner_user.last_name, owner_user.first_name) AS ownerSort
FROM
joborder
LEFT JOIN company
ON joborder.company_id = company.company_id
LEFT JOIN contact
ON joborder.contact_id = contact.contact_id
LEFT JOIN attachment
ON joborder.joborder_id = attachment.data_item_id
AND attachment.data_item_type = 400
LEFT JOIN user AS recruiter_user ON joborder.recruiter = recruiter_user.user_id
LEFT JOIN user AS owner_user ON joborder.owner = owner_user.user_id LEFT JOIN saved_list_entry
ON saved_list_entry.data_item_type = 400
AND saved_list_entry.data_item_id = joborder.joborder_id
AND saved_list_entry.site_id = 1
WHERE
joborder.site_id = 1

AND (joborder.status = 'Active' OR joborder.status = 'OnHold' OR joborder.status = 'Full' )

GROUP BY joborder.joborder_id

ORDER BY dateCreatedSort DESC
LIMIT 0, 50