Skip to content
Snippets Groups Projects
Commit a625ab84 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #249 from protich/issue/239


Add GROUP BY clause to canned response load

Reviewed-by: default avatarJared Hancock <jared@osticket.com>
parents afe7853a 7f99d03d
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,9 @@ class Canned { ...@@ -36,7 +36,9 @@ class Canned {
.' FROM '.CANNED_TABLE.' canned ' .' FROM '.CANNED_TABLE.' canned '
.' LEFT JOIN '.CANNED_ATTACHMENT_TABLE.' attach ON (attach.canned_id=canned.canned_id) ' .' LEFT JOIN '.CANNED_ATTACHMENT_TABLE.' attach ON (attach.canned_id=canned.canned_id) '
.' LEFT JOIN '.EMAIL_FILTER_TABLE.' filter ON (canned.canned_id = filter.canned_response_id) ' .' LEFT JOIN '.EMAIL_FILTER_TABLE.' filter ON (canned.canned_id = filter.canned_response_id) '
.' WHERE canned.canned_id='.db_input($id); .' WHERE canned.canned_id='.db_input($id)
.' GROUP BY canned.canned_id';
if(!($res=db_query($sql)) || !db_num_rows($res)) if(!($res=db_query($sql)) || !db_num_rows($res))
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment