Reply to Re: need help on a mysql query

Your name:

Reply:


Posted by SBmx on 11/21/07 16:28

On Nov 21, 5:05 pm, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:

>
> Try using GROUP BY and use HAVING


actually, i looked into subqueries and came up with this:
SELECT name, id FROM countries WHERE id IN (SELECT country FROM
products)
SELECT name, id FROM producttypes WHERE id IN (SELECT type FROM
products WHERE country=$intCountry)

seems to work, but your solution would probably be more backwards
compatible with older mysql versions.

thanks a bunch!

somBoy MX

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация