From 9da64aeb567086f9f6cf45f616e1995167856516 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 25 Apr 2010 18:28:44 +0000 Subject: [PATCH] database::get_value throw an exception if there are too many rows --- include/class_database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];