ORDER BY user.LName ASC
is correct. You’re probably just missing a space between it and the id. Check for the sql error
$sql = "
SELECT user.FName, user.LName, user.HerbalifeID, user.UplineS, registratie.PartnerFName, registratie.PartnerLName, registratie.NaamVIP1, registratie.NaamVIP2, registratie.NaamVIP3 FROM registratie INNER JOIN user ON registratie.userID = user.UserID AND registratie.eventID=$id
ORDER BY user.LName ASC
";
$res=mysqli_query($con,$sql);
if (!$res) {
printf("Errormessage: %s\n", mysqli_error($conn));
}
1
solved Sort results of query ASC [closed]