From: gburri Date: Thu, 2 Oct 2008 18:15:28 +0000 (+0000) Subject: FIX correction d'une grossière erreur made in PHP X-Git-Tag: cl7~14 X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=7e1a98c635c954cd3edeef6262a78159218fcc71;hp=be8e7d6f0af06c02c239a5e985c39e079727b3f1;p=cl7.git FIX correction d'une grossière erreur made in PHP git-svn-id: svn://localhost/cl7/trunk@9 4c3d3983-c6fa-4c6c-9935-18c3bbef1bf0 --- 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();