Salve, come si fa a fare una query che prenda dei dati con where da due tabelle?
Per esempio:
$query="select * from tabella1 where (campi==...) and where (campi della tabella2==...)";
Grazie.
Salve, come si fa a fare una query che prenda dei dati con where da due tabelle?
Per esempio:
$query="select * from tabella1 where (campi==...) and where (campi della tabella2==...)";
Grazie.
prova, l'ho scritto in frettacodice:$dati = mysql_query ("select dato1.tabella1, dato2.tabella1, dato1.tabella2, dato2.tabella2 FROM tabella1, tabella2 WHERE dato1.tabella1='' AND dato2.tabella2='' ");![]()
Ciao, grazie ma non va...![]()
tabella 1:
id importo nome
tabella 2:
id nome luogo
devo selezionare tutte el righe che hanno l'importo > di 1000 e il luogo="luogo", per esempio...
Ho fatto:
$query="select * from tabella1 as e LEFT JOIN tabella2 as g ON e.id=g.hid WHERE e.importo>'1000' and g.luogo='luogo'"; ma non va
![]()