Alexander (HH): 2 MYSQL Abfragen

Beitrag lesen

Moin Moin!

result_score = mysql_query("SELECT SUM(globalScore), 'stat_playerAtt' FROM stat_playerAtt")

UNION ALL
$result_score = mysql_query("SELECT SUM(roadtojalalabadTime), 'stat_Maps' FROM stat_Maps");
if (!$result_score) {
echo 'Die Abfrage konnte nicht ausgeführt werden.';
} else {
$summen_score = mysql_fetch_assoc($result_score);
}


>   
> Kommt das UNION ALL da überhaupt hin?  
  
Du fragst uns, wie man aus ZWEI Abfragen EINE baut. Und Dein neuer Code hat weiterhin ZWEI Abfragen? Und PHP mault fürchterlich rum, weil Du nach PHPs Meinung wirres Zeug redest. Wie mag da wohl die Antwort lauten?  
  
Und mal so am Rande: Gib im Fehelrfall die [MySQL-Fehlermeldung](http://www.php.net/manual/en/function.mysql-error.php) aus, sonst rätst Du nur sinnlos rum!  
  
Alexander

-- 
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so".