database::get_value throw an exception if there are too many rows
This commit is contained in:
parent
9cc6736dae
commit
9da64aeb56
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue