Buongiorno a tutti.
ho questa query:
Codice PHP:
$sql="SELECT register.IDUtente, Refeal, LivelloAssoluto, NumeroLivelli, Nome, Cognome, register.CodiceIncaricato, Refeals, Importo, ";
$sql.="CarrieraPersonale, CarrieraRete, Qualifica, ProvvigioneTotale FROM register, refeal, borsellino, excel WHERE ";
foreach($arrrefeals as $key => $refeal){
$sql.="register.IDUtente='$refeal' AND refeal.IDUtente=register.IDUtente AND borsellino.IDUtente=register.IDUtente AND excel.IDUtente=register.IDUtente";
if($key < count($arrrefeals)) $sql.=" OR ";
}
$sql.=" ORDER BY LivelloAssoluto ASC";
$QueryMast=mysql_query($sql) or die (mysql_error());
mi da questo errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY LivelloAssoluto ASC' at line 1