diff --git a/include/class_database.php b/include/class_database.php index 03147d31e..e16f23d06 100644 --- a/include/class_database.php +++ b/include/class_database.php @@ -391,7 +391,7 @@ de données"); { $this->ret=$this->exec_sql($p_sql,$p_array); if ( pg_NumRows($this->ret) == 0 ) return ""; - if ( pg_NumRows($this->ret) > 1 ) echo "Attention $p_sql retourne plusieurs valeurs"; + if ( pg_NumRows($this->ret) > 1 ) throw new Exception( "Attention $p_sql retourne plusieurs valeurs"); $r=pg_fetch_row($this->ret,0); return $r[0];