Re: [PHP-DB] SELECT query from two tables

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
Ron Piggott wrote:
> Two different rows Chris.  

That's the problem then.

Your query is saying "get records with category_reference of 10 and it 
has to have category_reference of 11 as well".

No such rows exist.

Maybe that should be an 'or' or 'in' (same thing).

... 
ministry_directory_listing_categories.ministry_directory_category_reference 
in (10,11)
...
;

so it can get both records 13 & 14.

> reference ministry_directory_entry ministry_directory_category_reference
> 13 	1 	10
> 14 	1 	11



-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.