From ad3fa669c6686e1a4326150a8d55a2e3ec5c76b8 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Fri, 14 Jan 2005 10:50:57 +0000 Subject: [PATCH] optimisation de la requete pour les notifications du carnet git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-313 --- include/notifs.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/notifs.inc.php b/include/notifs.inc.php index c28cefb..dffb1db 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -104,7 +104,8 @@ function select_notifs_base($base_watch, $champ_w, $champ_u, $watcher, $watcher_ function select_notifs($wuid, $details, $last, $wflag, $order) { $recent = ($last == 'watch_last'); - $contactflag = "FIND_IN_SET('contacts', q.watch_flags)"; + // équivalent de FIND_IN_SET('contacts', q.watch_flags) mais en plus rapide + $contactflag = "(q.watch_flags=1 OR q.watch_flags=3)"; $where_clause = ""; if ($wuid != 'all') -- 2.1.4