no save
Assistance
Achat
News

Forum | webmastering
[php] probleme affichage moteur de recherche
ottis, le sam. 25 juin 2005 à 13:45:15
D'accord donc par exemple si j'ai 3 tables ça donne ça :
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,lien.$table3,nom.$table3, FROM $table1,$table2,$table3 WHERE (nom.$table1 LIKE '$like') AND nom.table2 LIKE '$like' AND nom.table3 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>';
echo '<a href="'.$row[4].'">'.$row[5].'</a>';
}
}
$nbre_mots++;
}

Ne manque-t-il pas $ ?
WHERE (nom.$table1 LIKE '$like') AND nom.$table2 LIKE '$like' AND nom.$table3 LIKE '$like' ");
Précédentkilian
juin 05
kilian
juin 05
Suivant
REPONSES
kilian
juin 05
ottis
juin 05
ottis
juin 05
kilian
juin 05
ottis
juin 05
kilian
juin 05
ottis
juin 05
kilian
juin 05
ottis
juin 05
kilian
juin 05
Version Web
Réalisé par RedShift
no save