Version of script: 2.8.1
Write your message below:
Hi again. I must have another error in database because when I try to merge two or more tickets it shows me an SQL generic error.
I've looked at database and I see it converts tickets to replies, but it doesn't update ticket `merged` info, so it does not show merged tickets as reply.
Can you help me please?
Thanks a lot!
SQL error merging tickets
Moderator: mkoch227
Re: SQL error merging tickets
If you enable debug mode in settings, the error message should display the SQL query and why the query failed to execute. Try enabling debug mode, merge some tickets, and if there is an error, share the full error here.
Mike, Lead Developer of
HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
Re: SQL error merging tickets
Thanks for your reply mkoch227, but enabling debug mode the SQL error is still generic.
It only says "Can't execute SQL"
Any workaround?
Thank you!
It only says "Can't execute SQL"
Any workaround?
Thank you!
Re: SQL error merging tickets
Debug mode isn't enabled if all you see is the "Can't execute SQL". Or are you running a mod, not original Hesk?
Make 100% sure you enable it: Admin panel > Settings > Help desk tab > under "Features" make sure "Debug mode:" is ON and then Save changes.
Make 100% sure you enable it: Admin panel > Settings > Help desk tab > under "Features" make sure "Debug mode:" is ON and then Save changes.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: SQL error merging tickets
You are right Klemen. It was my mistake.
The SQL output I get is this:
Can't execute SQL: SELECT COUNT(*) as `cnt`, `staffid` FROM `hesk_replies` WHERE `replyto`=14577 GROUP BY CASE WHEN `staffid` = 0 THEN 0 ELSE 1 END ASC
MySQL said:
Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hesk.hesk_replies.staffid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Thanks for your attention
The SQL output I get is this:
Can't execute SQL: SELECT COUNT(*) as `cnt`, `staffid` FROM `hesk_replies` WHERE `replyto`=14577 GROUP BY CASE WHEN `staffid` = 0 THEN 0 ELSE 1 END ASC
MySQL said:
Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hesk.hesk_replies.staffid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Thanks for your attention
Re: SQL error merging tickets
Seems like MySQL's ONLY_FULL_GROUP_BY mode doesn't like the way that query is structured. We learn something new every day...
Try uploading this "admin_functions.inc.php" file to your "inc" folder (overwrite exiting file) and see if that fixes your problem: https://hesk.com/extras/hesk281_group_by.zip
Did it do the trick?
Try uploading this "admin_functions.inc.php" file to your "inc" folder (overwrite exiting file) and see if that fixes your problem: https://hesk.com/extras/hesk281_group_by.zip
Did it do the trick?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: SQL error merging tickets
It worked!
You're the master
Thank you very much!
You're the master

Thank you very much!
Re: SQL error merging tickets
Excuse me, but now, with the file you told me to change I find some untraslated strings.
For example: the status of the ticket now is in English, but my language is set to catalan.
May it be something in the file you sent me?
Thanks again
For example: the status of the ticket now is in English, but my language is set to catalan.
May it be something in the file you sent me?
Thanks again
Re: SQL error merging tickets
That file doesn't change anything language related.
Try clearing the cache by going to Admin panel > Settings and click "Save changes" at the bottom.
Try clearing the cache by going to Admin panel > Settings and click "Save changes" at the bottom.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: SQL error merging tickets
Thanks again Klemen!
It worked!
Best regards
It worked!
Best regards