I'm about to pull my hair out on this one so I thought I would see if
somebody could point me in the right direction.

I have a subquery that like like so.

SELECT  *
FROM Word
INNER  JOIN DomainWord
USING ( word )
INNER  JOIN Domain
USING ( domain )
WHERE Domain.domain = ANY(
SELECT Domain.domain
FROM Word
INNER  JOIN DomainWord
USING ( word )
INNER  JOIN Domain
USING ( domain )
WHERE Word.word =  'php' ) AND parked =  'N'

And the results are below.  Only problem is that I only want the domain back
if pvr for all entries is Y.  If there are any N's I don't want the domain
back.

+---------+------------+---------------------+-----+----------------+-------
--+----------------+-------+--------+---------------------+
| word    | word_count | updated             | pvr | domain         | word
| domain         | words | parked | updated             |
+---------+------------+---------------------+-----+----------------+-------
--+----------------+-------+--------+---------------------+
| extreme |        108 | 2004-02-25 13:07:21 | Y   | extremephp.org |
extreme | extremephp.org |     5 | N      | 2004-02-25 11:48:41 |
| mep     |        187 | 2004-02-25 11:48:41 | Y   | extremephp.org | mep
| extremephp.org |     5 | N      | 2004-02-25 11:48:41 |
| php     |         26 | 2004-02-25 13:10:53 | Y   | extremephp.org | php
| extremephp.org |     5 | N      | 2004-02-25 11:48:41 |
| php     |         26 | 2004-02-25 13:10:53 | Y   | phpiba.com     | php
| phpiba.com     |     3 | N      | 2004-02-25 13:10:53 |
| hpib    |          3 | 2004-02-25 13:10:53 | N   | phpiba.com     | hpib
| phpiba.com     |     3 | N      | 2004-02-25 13:10:53 |
| iba     |         66 | 2004-02-25 13:10:58 | Y   | phpiba.com     | iba
| phpiba.com     |     3 | N      | 2004-02-25 13:10:53 |
+---------+------------+---------------------+-----+----------------+-------
--+----------------+-------+--------+---------------------+

Any ideas?

Donny



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to