Alors on va dire que le nom de tes tables est stocké comme ceci:
$table1="table1";
$table2="table2";
Bon je pars du principe que dans ces tables tu as un champs "nom" et un champs "lien". Sinon il faudra adapter.
Ca donne donc ceci:
while ($nbre_mots < sizeof($motclef)) {
if (strlen($motclef[$nbre_mots]) > 2) {
$like="%$motclef[$nbre_mots]%";
$query_nom = mysql_query ("SELECT lien.$table1, nom.$table1,lien.$table2,nom.$table2, FROM $table1,$table2 WHERE (nom.$table1 LIKE '$like') AND nom.table2 LIKE '$like' ");
while ($row_nom = mysql_fetch_array($query_nom)) {
echo '<a href="'.$row[0].'">'.$row[1].'</a>';
echo '<a href="'.$row[2].'">'.$row[3].'</a>';
}
}
$nbre_mots++;
}
J'ai simplifié quelques trucs. Et j'ai supprimé $query_lien qui ne servait à rien.


