# Really in a hurry with the php script

**URL:** <https://forum.kirupa.com/t/really-in-a-hurry-with-the-php-script/199937>\
**Category:** Uncategorized\
**Created:** [September 7, 2006, 11:40am UTC](https://forum.kirupa.com/t/really-in-a-hurry-with-the-php-script/199937 "2006-09-07T11:40:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designursite](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/designursite/32/2209_2.png) [@designursite](https://forum.kirupa.com/u/designursite)\
**Post date:** [September 7, 2006, 11:40am UTC](https://forum.kirupa.com/t/really-in-a-hurry-with-the-php-script/199937/1 "2006-09-07T11:40:36Z")

</div>

**CAN SOMEONE HELP ME …CORRECT THE ERROR IN THE FOLLOWING SCRIPT BELOW:::**

I am stuck on this issue trying to fix something like this:

mysql query:  
///////////////////////////////////////////  
SELECT  
table1.city\_id,  
table2.main\_id,  
table3.city\_name,  
COUNT(\*) AS count  
FROM  
table1,  
table2,  
table3  
WHERE  
table2.main\_id=table1.main\_id AND  
table2.description\_id=‘1’ AND  
table2.country=‘uk’ AND  
table1.city\_id=table3.city\_id AND  
table3.language=‘de’  
GROUP BY city\_id  
ORDER BY city\_name ASC  
///////////////////////////////////////////

What i want you do is help me fixing these few issue’s:

-\> get the city names of the tables that do cointain information  
of the previous selected language  
-\> count the total row  
-\> ORDER the result by city name ASC

We are talking about 1 database with 3 tables

the problem is that in the table that holds all the citynames  
some cities are not translated in the language we are looking  
for. In that case the english version should be selected by  
default.

So all you have to do is get us the correct Query.  
everything else is already working.

**PLEASE IN A REALL HURRY!!!**
