Skip to content
Snippets Groups Projects
Commit 7f99d03d authored by Peter Rotich's avatar Peter Rotich
Browse files

Add GROUP BY clause to canned response load

parent afe7853a
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.
Please register or to comment