MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] presorting results of a search



Well, I guess nobody wants to answer this one. We had the same problem, the
way we got around it is buy using SQL.

[sql type=list query="SELECT * FROM products

   WHERE  category like '%[value mv_categories]%'
          AND manufacturer like '[value mv_manufacturer]%' AND
          (
                category       like '%[value mv_searchspec]%'
                 OR comment     like '%[value mv_searchspec]%'
                 OR description like '%[value mv_searchspec]%'
                 OR searchkey   like '%[value mv_searchspec]%'
          )
          AND price >= '[value mv_range_min]'
          AND price <= '[value mv_range_max]'
          AND search = 1

          ORDER by '[value sort_field1]'
          LIMIT [calc][value mv_first_match]+1-1[/calc],[value
mv_matchlimit]
"]

And we set mv_first_match and mv_matchlimit to the right numbers depending
on the result page they are on. And the "next page", "prev page" links will
calc the mv_first_match and mv_matchlimit var to the right ones for the next
result page to come...

Anyways, hope that helps a little. Here is the site that use it:
http://www.gizmomall.com

Ying,

----- Original Message -----
From: Jeff Maxwell <jeff@crossvalley.com>
To: Minivend list <minivend-users@minivend.com>
Sent: Wednesday, November 10, 1999 8:15 AM
Subject: [mv] presorting results of a search


> ******    message to minivend-users from Jeff Maxwell
<jeff@crossvalley.com>     ******
>
> I want to presort the results of a search. so that if I have a
> multiple page results they are sorted for the entire found set and
> not for each page.
>
> How can I do this?
> Jeff Maxwell
> jeff@crossvalley.com
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list



Search for: Match: Format: Sort by: