Subversion Repositories eFlore/Applications.coel

Rev

Rev 1666 | Rev 1696 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1666 Rev 1692
Line 44... Line 44...
44
// correction
44
// correction
45
$db->query('UPDATE coel_structure SET cs_longitude = REPLACE(cs_longitude, ",", "."), cs_latitude = REPLACE(cs_latitude, ",", ".")');
45
$db->query('UPDATE coel_structure SET cs_longitude = REPLACE(cs_longitude, ",", "."), cs_latitude = REPLACE(cs_latitude, ",", ".")');
46
$db->query('ALTER TABLE coel_structure MODIFY cs_longitude DOUBLE(12,9) NULL DEFAULT NULL');
46
$db->query('ALTER TABLE coel_structure MODIFY cs_longitude DOUBLE(12,9) NULL DEFAULT NULL');
47
$db->query('ALTER TABLE coel_structure MODIFY cs_latitude DOUBLE(12,9) NULL DEFAULT NULL');
47
$db->query('ALTER TABLE coel_structure MODIFY cs_latitude DOUBLE(12,9) NULL DEFAULT NULL');
48
$db->query('UPDATE coel_structure SET cs_latitude = NULL, cs_longitude = NULL WHERE cs_latitude = "0" AND cs_longitude = "0"');
48
$db->query('UPDATE coel_structure SET cs_latitude = NULL, cs_longitude = NULL WHERE cs_latitude = "0" AND cs_longitude = "0"');
-
 
49
$db->query('UPDATE coel_structure SET cs_nbre_personne = NULL WHERE cs_nbre_personne = 0');
49
// smooth:
50
// smooth:
50
$q = "SELECT * FROM coel_structure".
51
$q = "SELECT * FROM coel_structure".
51
	" WHERE cs_latitude IS NULL OR cs_latitude = '' OR cs_longitude IS NULL".
52
	" WHERE cs_latitude IS NULL OR cs_latitude = '' OR cs_longitude IS NULL".
52
	" OR cs_longitude = ''";
53
	" OR cs_longitude = ''";
53
foreach($db->query($q)->fetchAll(PDO::FETCH_ASSOC) AS $params) {
54
foreach($db->query($q)->fetchAll(PDO::FETCH_ASSOC) AS $params) {