protect sql

This commit is contained in:
Dany De Bontridder 2011-04-25 20:35:36 +00:00
parent ccfa69f9bc
commit e44fdac9a3

View file

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