From: Florent Bruneau Date: Tue, 16 Dec 2008 14:50:04 +0000 (+0100) Subject: Fix invalid query. X-Git-Tag: xorg/0.10.1~49^2~48 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=22cc337093d7fae4374839183eedbd76dddb065e;p=platal.git Fix invalid query. Signed-off-by: Florent Bruneau --- diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 8511a4e..28ffe51 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -326,8 +326,10 @@ function fix_cities_not_on_map($limit=false, $cityid=false) $values .= ",($cityid, $map_id, '')"; } } - XDB::execute("REPLACE INTO geoloc_city_in_maps - VALUES ".substr($values, 1)); + if (strlen($values) > 1) { + XDB::execute("REPLACE INTO geoloc_city_in_maps + VALUES ".substr($values, 1)); + } } else { return false; }