Overview
Comment:Sous-requête qui n'était pas correctement formulée
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9d2c3747e3319eb0aaeff2a95b6edaf75381ec29
User & Date: bohwaz on 2014-11-22 17:51:24
Other Links: manifest | tags
Context
2014-12-18
16:06
Correction : group by mal situé check-in: 9efe281e4a user: bohwaz tags: trunk
2014-11-22
17:51
Sous-requête qui n'était pas correctement formulée check-in: 9d2c3747e3 user: bohwaz tags: trunk
2014-11-06
00:45
running_sum via sqlite n'était pas fiable, faisons-le en PHP check-in: 199862d6c4 user: bohwaz tags: trunk
Changes

Modified src/include/class.rappels.php from [17914b30dc] to [2b30cb0cb2].

181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
				/* Rien nest envoyé aux membres des catégories cachées, logique */
				AND m.id_categorie NOT IN (SELECT id FROM membres_categories WHERE cacher = 1)
			ORDER BY r.delai ASC
		)
		WHERE nb_jours >= delai 
			/* Pour ne pas spammer on n\'envoie pas de rappel antérieur au dernier rappel déjà effectué */
			AND id NOT IN (SELECT id_membre FROM rappels_envoyes AS re 
				WHERE id_cotisation = re.id_cotisation AND id = re.id_membre 
				AND re.date >= date(expiration, delai || \' days\')
			)
		/* Grouper par membre, pour n\'envoyer qu\'un seul rappel par membre/cotise */
		GROUP BY id, id_cotisation
		ORDER BY nb_jours DESC;';

		$db->exec('BEGIN');







|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
				/* Rien nest envoyé aux membres des catégories cachées, logique */
				AND m.id_categorie NOT IN (SELECT id FROM membres_categories WHERE cacher = 1)
			ORDER BY r.delai ASC
		)
		WHERE nb_jours >= delai 
			/* Pour ne pas spammer on n\'envoie pas de rappel antérieur au dernier rappel déjà effectué */
			AND id NOT IN (SELECT id_membre FROM rappels_envoyes AS re 
				WHERE id_cotisation = re.id_cotisation 
				AND re.date >= date(expiration, delai || \' days\')
			)
		/* Grouper par membre, pour n\'envoyer qu\'un seul rappel par membre/cotise */
		GROUP BY id, id_cotisation
		ORDER BY nb_jours DESC;';

		$db->exec('BEGIN');