Hello,

J'ai un petit prob de jointure :

global $db2;

if (isset($_SESSION['artid'])){//edit mode
$query="SELECT a.id,a.rc_id,a.brand_id,a.target_id,a.item_description,a.item_trax,a.item_id,a.item_price,a.item_pic,a.item_pic1,a.item_pic2,a.item_pic3,a.item_comment,
a.item_ftech,a.item_dia,a.item_nosell,a.item_new,a.item_special FROM cms_shop_items a LEFT JOIN cms_shop_model b ON a.target_id=b.id
WHERE a.id=".$_SESSION['artid'];
$db->query($query);
$db->next_record();
$nosell=$newitem='';
if ($db->f('item_nosell')==1) $nosell='checked';
if ($db->f('item_new')==1) $newitem='checked';
if ($db->f('item_special')==1) $itemspecial='checked';

$query="SELECT brand.brandname, model.descr, model.trax, model.year FROM cms_shop_brand brand, cms_shop_partmodel pm, cms_shop_items item, cms_shop_model model
WHERE item.item_trax=model.trax AND rc_brand='1' AND model.brand_id=brand.id AND pm.model_id=model.id=".tosql($_SESSION['artid'])." ORDER BY brand.brandname DESC";
$targetmodellist='';
$db2->query($query);
$result = mysql_query($query);
$nb = mysql_num_fields($result);
if ($nb!=0){
}
while($db2->next_record()){
$targetmodellist.='<option>'.$db2->f('brand_id').'&nbsp;'.$db2->f('descr').'&nbsp;'.$db2->f('year').'&nbsp;'.$db2->f('trax').'</option>';
}

Donc je souhaite afficher une jointure d'une base deux champs l'un est : model.trax qui indique une taille d'un model lors de la session et l'autre qui est le champs item_trax qui indique la meme taille dans le : $targetmodellist sauf que il m'affiche plusieurs fois le meme modele dans cette liste comment faire pour que il me donne qu'une fois ce qu'il y a dans le champs?
Merci d'avance