$db = new DB_Mysql($__DB_SERVER, $_Guide_DB);
$query='select concat(category.linkurl,"/",shop.linkurl,"/",product.linkurl,"/") as plink, product.name ,concat(shop.linkurl,"/") as slink,rank,shop.id as sid,product.id as pid,
shop.company
from category, product, shop where product.shop_id=shop.id and category.id=product.category_id and category_id='.$category_id.'
and product.id<>'.$tabproduct[id].' and affiliate=1 and rank<>0 and shop.id<>'.$tabShop[id].' and product.range<>'.$tabproduct[range].'
group by shop.id order by rank asc limit 5';
if ($db->query($query) && $db->num_rows()>0) {
echo "
Les Offres similaires";
echo "";
echo "
| Note | Hébergeur | Offre | Classement |
| ".displayScore(getScore($db->field(sid)))." | field(slink).">".$db->field(company)." |  field(plink).">Offre ".$db->field(name)." | ($tabPos[phrase]) |