solo che non riesco a far richiamare il nome, ovvero:
se queste sono le mie tabelle
yp_businness
name
busid
infopageid
yp_infopage
infopageid
pagetext
cercando nella seconda riesco ad avere nel link di risposta il campo busid della prima ma non il campo name
questa è la parte di codice incriminata, qualcuno può aiutarmi? pleaseeeeeeeeeeeeeeeeeee!!!
----------------------------------------------------------------
$result = sql_query("select infopageid from yp_infopage where pagetext LIKE '%$query%' order by infopageid DESC", $dbi);
$row2 = sql_query("select name, busid from yp_business where infopageid='$row2[busid]'", $dbi);
echo $row2['name'];
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"tabletable\" width=\"95%\" align=\"center\"> <tr> <td class=\"tableHeaderTD\">[B]"RISULTATI DELLA RICERCA"</a>
</tr></table>";
if (sql_num_rows($result, $dbi) == 0) {
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"95%\" align=\"center\"> <tr> <td>"NESSUN RISULTATO TROVATO"</a></tr>
</table>";
} else {
while(list($busid, $name) = sql_fetch_row($result, $dbi)) {
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"95%\" align=\"center\"> <tr> <td><big>·</big><a href=\"cercaazienda&file=index&func=displayinfo&bi d=$busid\">ssss$name</a></a>
</tr></table>";

Rispondi quotando