[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Search differences
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Stefan Hornburg (racke@linuxia.de):
> ****** message to minivend-users from Stefan Hornburg <racke@linuxia.de> ******
>
>
> I like to make a complex SQL query for a search:
> select * from .. where .. in (12, 15, 22).
>
> Passed in a search form with sq=
> this results in "BAD SQL" because SQL::Statement don't knows
> of "in".
>
> If I use [query sql=".."], this seems not to get parsed by SQL::Statement,
> so I suffices. But the results page is quite complex, so I need
> several loops over the search list.
> This works fine:
>
> [search-region]
> [search-list]
> ...
> [/search-list]
> [/search-region]
>
> ...
>
> [search-region]
> [search-list]
> ...
> [/search-list]
> [/search-region]
>
> but with query it is not possible to limit the search:
>
> [query list=1 more=1 ml=3]
> [/query]
>
> ...
>
> [query list=1 more=1 ml=3]
> [/query]
>
> On the succeeding pages, the first query shows the succeeding results,
> but the other queries shows always the first 3 results.
>
> Looking into the code Vend::More_in_progress is reset to undef
> on the first invocation.
>
> Any hints ?
This is a case of having the products database not in SQL, but the
target table in SQL.
In that case, you need to say [query base=table_that_is_sql sql="...."]
so the SQL is not touched by SQL::Statement.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
-
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