Page 1 of 1

Comibine a destinct query

Posted: Wed Jul 30, 2003 11:03 am
by GK
hi all

i got an query that gets all country from a table a puts it in my form option table

this is the query
$query = mysql_query ("SELECT DISTINCT country FROM ip ORDER BY country",$db) or die("Sites Database SELECT Error");

if 1 of this countrys is used it will be putted in "land from iptable"

How do i tell in the first query to first look if a country is used in "land from iptable" and then output all the countrys from "country from ip" without the used countrys

Can some one help me out?

greetz
gerd

Posted: Wed Jul 30, 2003 2:02 pm
by illiquid050
what do you mean by "used" countries...

i guess i'm not understanding your question. The answer may become self-evident if you write out exactly what information you're trying to get.

Posted: Wed Jul 30, 2003 3:44 pm
by GK
i got another table that conatins the used domains same names as in the other table


it got it to do a simple sum LOL
Countrys that are used in all rows of iptable shouldn;t be outputed in mij query on the country namen in table ip