ciao ragazzi...
se io scrivo le 2 query
Codice PHP:
$sogge="select* from speodr,supspe where speodr.idc=$idcl and speodr.trasferito=2 and speodr.datadb>=(CURDATE()-INTERVAL $mm DAY) and (speodr.ido=supspe.ido and speodr.nspe=supspe.nspe) order by datadb desc,dno asc";
e
$sogge="select* from speodr,supspe where (speodr.ido=supspe.ido and speodr.nspe=supspe.nspe) and speodr.idc=$idcl and speodr.trasferito=2 and speodr.datadb>=(CURDATE()-INTERVAL $mm DAY) order by datadb desc,dno asc";
c'è differenza di prestazioni?
nella prima faccio i filtri di quello che mi serve come condizioni , e poi il join tra le 2 tabelle...
nella seconda faccio prima il join tra le 2 tabelle e poi applico le altre clausule...
grazie