From 7e1a98c635c954cd3edeef6262a78159218fcc71 Mon Sep 17 00:00:00 2001 From: gburri Date: Thu, 2 Oct 2008 18:15:28 +0000 Subject: [PATCH 1/1] =?utf8?q?FIX=20correction=20d'une=20grossi=C3=A8re=20?= =?utf8?q?erreur=20made=20in=20PHP?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://localhost/cl7/trunk@9 4c3d3983-c6fa-4c6c-9935-18c3bbef1bf0 --- php/update_db.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/php/update_db.php b/php/update_db.php index 356ba67..cc92e3a 100644 --- a/php/update_db.php +++ b/php/update_db.php @@ -74,7 +74,11 @@ function update_db() { # si la table 'config' n'existe pas alors on suppose qu'aucune table n'existe $version = 0; - if(!$version = (int)@mysql_fetch_object(mysql_query("SELECT valeur FROM config WHERE nom = 'version'"))) + $res = @mysql_fetch_object(mysql_query("SELECT valeur FROM config WHERE nom = 'version'")); + if (!mysql_error()) + $version = $res->valeur; + + if($version == 0) { mysql_query("BEGIN TRANSACTION"); creer_db(); -- 2.45.2