diff --git a/html/fid_card.php b/html/fid_card.php index 9de8b902a..4ca8a2e4b 100644 --- a/html/fid_card.php +++ b/html/fid_card.php @@ -98,24 +98,40 @@ if ( $jrn != -1 ) { /* create a filter based on j */ -$sql_str="select f_id, vw_name,quick_code,vw_description ". +/*$sql_str="select f_id, vw_name,quick_code,vw_description ". " from vw_fiche_attr where ". " ( vw_name ilike '%'||$1||'%' or quick_code ilike $2||'%' or vw_description ilike '%'||$3||'%') ". $filter_card; +*/ -$sql=$cn->get_array($sql_str - ,array($_REQUEST['FID'],$_REQUEST['FID'],$_REQUEST['FID'])); +$sql_str="select distinct f_id from fiche join jnt_fic_att_value using (f_id) join attr_value using(jft_id) where ad_id in (9,1,23) and av_text ilike '%'||$1||'%' ".$filter_card; + +$sql=$cn->get_array($sql_str ,array($_REQUEST['FID'])); if (sizeof($sql) != 0 ) { echo "