Overview
Comment:Tri sans tenir compte des accents
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e309d8b4aa2a6c0c89240215869ad562485abcf
User & Date: bohwaz on 2014-04-21 15:54:42
Other Links: manifest | tags
Context
2014-04-21
15:59
le nom du fichier est en français check-in: d88988316b user: bohwaz tags: trunk
15:54
Tri sans tenir compte des accents check-in: 2e309d8b4a user: bohwaz tags: trunk
02:28
Repasse pour suppression des double quotes dans les requêtes SQLite + suppression appel DB::getInstance() inutile check-in: 63cb8357be user: bohwaz tags: trunk
Changes

Modified src/include/class.cotisations.php from [beb3f2ea0a] to [856480ae44].

146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164

165
166
167
168
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM cotisations ORDER BY intitule;');
	}

	public function listCurrent()
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM cotisations WHERE fin >= date(\'now\') OR fin IS NULL ORDER BY intitule;');

	}

	public function listCurrentWithStats()
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT co.*,
			(SELECT COUNT(DISTINCT id_membre) FROM cotisations_membres WHERE id_cotisation = co.id) AS nb_membres,
			(SELECT COUNT(DISTINCT id_membre) FROM cotisations_membres AS cm WHERE id_cotisation = co.id
				AND ((co.duree IS NOT NULL AND date(cm.date, \'+\'||co.duree||\' days\') >= date())
					OR (co.fin IS NOT NULL AND co.debut <= cm.date AND co.fin >= cm.date))) AS nb_a_jour
			FROM cotisations AS co WHERE fin >= date(\'now\') OR fin IS NULL ORDER BY intitule;');

	}
}

?>







|
>










|
>




146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM cotisations ORDER BY intitule;');
	}

	public function listCurrent()
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM cotisations WHERE fin >= date(\'now\') OR fin IS NULL
			ORDER BY transliterate_to_ascii(intitule) COLLATE NOCASE;');
	}

	public function listCurrentWithStats()
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT co.*,
			(SELECT COUNT(DISTINCT id_membre) FROM cotisations_membres WHERE id_cotisation = co.id) AS nb_membres,
			(SELECT COUNT(DISTINCT id_membre) FROM cotisations_membres AS cm WHERE id_cotisation = co.id
				AND ((co.duree IS NOT NULL AND date(cm.date, \'+\'||co.duree||\' days\') >= date())
					OR (co.fin IS NOT NULL AND co.debut <= cm.date AND co.fin >= cm.date))) AS nb_a_jour
			FROM cotisations AS co WHERE fin >= date(\'now\') OR fin IS NULL
			ORDER BY transliterate_to_ascii(intitule) COLLATE NOCASE;');
	}
}

?>