@@ -242,8 +242,7 @@ function addDateCriteria(&$query, $dateBegin, $dateEnd){
242242
243243 // Survey not answered
244244 $ query = "SELECT count(*) as nb FROM " . TicketSatisfaction::getTable ();
245- $ query .= " WHERE 1=1 " ;
246- $ query .= " AND date_answered IS NULL " ;
245+ $ query .= " WHERE date_answered IS NULL " ;
247246 addDateCriteria ($ query , $ opt ['begin ' ], $ opt ['end ' ]);
248247
249248 $ result = $ DB ->query ($ query );
@@ -256,8 +255,7 @@ function addDateCriteria(&$query, $dateBegin, $dateEnd){
256255
257256 // Survey answered
258257 $ query = "SELECT count(DISTINCT tickets_id) as nb FROM " . TicketSatisfaction::getTable ();
259- $ query .= " WHERE 1=1 " ;
260- $ query .= " AND date_answered IS NOT NULL " ;
258+ $ query .= " WHERE date_answered IS NOT NULL " ;
261259 addDateCriteria ($ query , $ opt ['begin ' ], $ opt ['end ' ]);
262260
263261 $ result = $ DB ->query ($ query );
@@ -270,8 +268,7 @@ function addDateCriteria(&$query, $dateBegin, $dateEnd){
270268
271269 // Global satisfaction
272270 $ query = "SELECT AVG(satisfaction) as nb FROM " . TicketSatisfaction::getTable ();
273- $ query .= " WHERE 1=1 " ;
274- $ query .= " AND date_answered IS NOT NULL " ;
271+ $ query .= " WHERE date_answered IS NOT NULL " ;
275272 addDateCriteria ($ query , $ opt ['begin ' ], $ opt ['end ' ]);
276273
277274 $ result = $ DB ->query ($ query );
0 commit comments