Re: Return Results in Categories - like CNET
| From: | olinux | Date: | Fri, 16 Aug 2002 21:57:19 +0000 |
| Subject: | Re: Return Results in Categories - like CNET | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21183@lists.php.net to get a copy of this message | ||
Thank you but this is not what I am looking for.
LIMIT will limit the overall results but I need to
limit the number of matches to each category 'type'
example: for the data below there may be 1000 news
story matches - I want to return the user the top 5
news stories - the top 5 feature matches - the top 5
coverstories etc.
Table structure is something like this
id | date | category | title | article
example data:
1 | 20020815 | news | title | article
2 | 20020815 | news | title | article
3 | 20020815 | features | title | article
4 | 20020815 | features | title | article
5 | 20020815 | coverstory | title | article
Thanks much,
olinux
--- Adam Williams <awilliam@mdah.state.ms.us> wrote:
> If your articles are in an SQL database uses the
> LIMIT clause on your SQL
> statement.
>
> Adam
>
> On Fri, 16 Aug 2002, olinux wrote:
>
> > I would like to allow articles to be searched and
> > returned in grouped categories - similar to
> cnet.com
> >
> > See example here:
> > http://cnet.search.com/search?timeout=3&q=php
> >
> > Grouping is not a problem - but it becomes a
> problem
> > when there are thousands of results and I only
> want to
> > display the first few - similar to the way cnet
> does.
> >
> > Thanks much,
> > olinux
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
> >
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com