Skip to content
Snippets Groups Projects
Commit 3506d15a authored by Vinciane's avatar Vinciane
Browse files

FIX #9511 Parentheses deletion in query

parent 6a3ef9d7
No related branches found
No related tags found
No related merge requests found
......@@ -209,7 +209,7 @@ class AcknowledgementReceiptController
//Verify sending
$acknowledgements = AcknowledgementReceiptModel::get([
'select' => ['res_id', 'type', 'format', 'creation_date', 'send_date'],
'where' => ['res_id = (?)', 'type = (?)'],
'where' => ['res_id = ?', 'type = ?'],
'data' => [$resId, $templateAttachmentType],
]);
......
......@@ -241,7 +241,7 @@ abstract class TemplateModelAbstract
'select' => ['ta.value_field', 'e.entity_label'],
'table' => ['templates t','templates_association ta', 'entities e'],
'left_join' => ['ta.template_id = t.template_id', 'e.entity_id = ta.value_field'],
'where' => empty($data['template_id']) ? ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)'] : ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)', 't.template_id != (?)' ],
'where' => empty($data['template_id']) ? ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)'] : ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)', 't.template_id != ?' ],
'data' => empty($data['template_id']) ? [$data['template_target'], $data['template_attachment_type'], $data['entities']] : [$data['template_target'], $data['template_attachment_type'], $data['entities'], $data['template_id']],
'groupBy' => ['ta.value_field', 'e.entity_label']
]);
......
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