sugar
Erfahrenes Mitglied
Ich habe folgende Fehlermeldung:
Temporary query failure: Unknown column 'address_book.entry_country_id' in 'on clause'
bei meiner MySQL Abfrage:
Ich habe gelesen es könnte an einer veralteten Schreibweise liegen, ich habe
MySQL - 5.0.26, was muss ich ändern?
Temporary query failure: Unknown column 'address_book.entry_country_id' in 'on clause'
bei meiner MySQL Abfrage:
PHP:
<?php
$query = "SELECT DISTINCT COUNT(*) as count, address_book.entry_country_id, countries.countries_name FROM address_book, customers JOIN countries ON address_book.entry_country_id = countries.countries_id WHERE customers.customers_id = address_book.customers_id AND customers.customers_default_address_id = address_book.address_book_id GROUP BY entry_country_id ORDER BY countries.countries_name";
$result = mysql_query($query) or die("Temporary query failure: " . mysql_error());
echo " <table>\n";
echo " <tr class=\"header\"><th>country</th><th>customers</th></tr>\n";
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo " <tr>\n";
echo " <td><a href=\"cities.php?country_id=$row[1]\">$row[2]</a></td>\n";
echo " <td align=\"center\">$row[0]</td>\n";
echo " </tr>\n";
}
echo " </table>\n";
mysql_free_result($result);
?>
Ich habe gelesen es könnte an einer veralteten Schreibweise liegen, ich habe
MySQL - 5.0.26, was muss ich ändern?