Reply to getting top 10 by group

Your name:

Reply:


Posted by M@ on 01/10/07 19:08

If I have a query I am writing, I can use the top 10 function to bring
back the top 10 rows. That's all fine if all I want is 10 rows.

What if I have a grouped query, and I have 5 entities that I want 10
rows each from? ie, I have 5 buildings I would want max 50 rows.

I tried Union, which works if you want them all, but I would like the
user to be able to supply me a list of buildings and be able to bring
back 10 rows for each building they ask for.

Possible?

I was thinking of creating a view, or writing a while and looping
through with a query, but I am unsure where to begin.

thanks,
M@

[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

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