protect sql

This commit is contained in:
Dany De Bontridder 2011-04-25 20:35:15 +00:00
parent 66f22175dd
commit ccfa69f9bc

View file

@ -1018,8 +1018,8 @@ class Fiche
function getName()
{
$sql="select ad_value from fiche_detail
where ad_id=1 and f_id=".$this->id;
$Res=$this->cn->exec_sql($sql);
where ad_id=1 and f_id=$1";
$Res=$this->cn->exec_sql($sql,array($this->id));
$r=Database::fetch_all($Res);
if ( sizeof($r) == 0 )
return 1;