From ea1a5b87fe8973065115e1e66edaf5b5b6060066 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 10 Nov 2011 21:29:44 +0000 Subject: [PATCH] Formatage + chgt make_array --- include/class_database.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/class_database.php b/include/class_database.php index b5e1e1371..23bf92637 100644 --- a/include/class_database.php +++ b/include/class_database.php @@ -75,7 +75,7 @@ class Database if ( $a == false ) { - if (DEBUG) + if (DEBUG) { ob_end_clean(); echo '

Impossible de se connecter à postgreSql !

'; @@ -91,7 +91,7 @@ class Database exit ("Connection impossible : vérifiez vos paramètres de base de données"); } - else + else { echo '

Erreur de connexion !

'; } @@ -122,20 +122,20 @@ class Database { try { - + $this->sql=$p_string; $this->array=$p_array; if ( $p_array==null ) { - if ( ! DEBUG ) + if ( ! DEBUG ) $this->ret=pg_query($this->db,$p_string); else $this->ret=@pg_query($this->db,$p_string); } else { - if ( ! DEBUG ) + if ( ! DEBUG ) $this->ret=pg_query_params($this->db,$p_string,$p_array); else $this->ret=@pg_query_params($this->db,$p_string,$p_array); @@ -542,7 +542,7 @@ class Database else return false; } /* - *!\brief test if a view exist + *!\brief test if a view exist * \return true if the view. exist otherwise false */ function exist_view($p_name) @@ -553,7 +553,7 @@ class Database return true; } /* - *!\brief test if a schema exists + *!\brief test if a schema exists * \return true if the schemas exists otherwise false */ function exist_schema($p_name) @@ -630,7 +630,7 @@ class Database { $a=$this->exec_sql($p_sql); $max=pg_NumRows($a); - if ( $max==0) return null; + if ( $max==0 && $p_null==0) return null; for ($i=0;$i<$max;$i++) { $row=pg_fetch_row($a);