projects
/
cl7.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX correction d'une grossière erreur made in PHP
[cl7.git]
/
php
/
update_db.php
diff --git
a/php/update_db.php
b/php/update_db.php
index
356ba67
..
cc92e3a
100644
(file)
--- 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;
{
# 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();
{
mysql_query("BEGIN TRANSACTION");
creer_db();