hallo,
Ich habe eine Frage mit einem query (PHP/MySQL)
Folgender query funktioniert und möchte ich gerne umändern
$q2="
SELECT SUM(score) AS `summe`,`tid`,`did`
FROM `2006_results`
WHERE `did`='{$result_date}'
GROUP BY `tid`
ORDER BY `summe`
DESC
";
Das Feld score
wird als summe ausgegeben.
Es kommt jetzt noch ein 2.Feld hinzu "ed"
Wie kann ich ebenfalls die summe von ed berechnen und als 2 Faktor mit summe2 ordnen
Bei diesem query bekomme ich eine fehlermeldung
$q2="
SELECT SUM(score,ed) AS `summe`,`summe2`,`tid`,`did`
FROM `2006_results`
WHERE `did`='{$result_date}'
GROUP BY `tid`
ORDER BY `summe`,`summe2`
DESC
";