Hi there,
I have a user table which contains province and country.
Another table named provinces contains this fields to and also the name of
the province.
Now I am trying to find out the provinces user are registered coming from a
special country. Unfortunatelly this statement underneath:
$stmt= "
SELECT DISTINCT c.province, c.province_id
from $DB2.$geo_T2 c, $DB.$T5 U
WHERE U.province_id = c.province_id AND c.country_code = '$country'
";
returns to much provinces. Thats because it is selecting all province_ids
from the user table and not only the ones with the proper country.
I guess there has to be a subselect ore something like this.
Maybe one of you guys have an idea.
Cheers Andy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]