[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [ic] *** Interchange 4.6 & PgSQL Difficulties ***
Quoting Mike Heins (mikeh@minivend.com):
> Quoting Marc Aubert (maubert@swisscenter.ch):
> > There are lots of examples
> > It seems that the SQL query is nicely transmitted to PgSQL (according
> > to logs), but nothing appears on the Interchange result page. Are we
> > missing something with the tags (we are using the standard
> > Interchange 4.6 demo for now) ?
> >
> > 2 - How to have a FORM sending its result to the page that contains
> > the SQL query so that the 'something' value in the SQL query can be
> > adapted with the FORM's result ?
> >
>
> I couldn't find this either, though I know I wrote the doc:
>
[snip]
> There is supposed to be some stuff to automatically use the value of variables
> as the search specification, but I can't for the life of me get it to work
> at the moment or even find the docs about it. I will fix that. 8-)
>
I found a bug -- that never happens. ;-)
Patched Scan.pm in CVS, now you can do:
<FORM ACTION="[area search]" METHOD=POST>
<INPUT TYPE=hidden NAME=mv_search_page VALUE="@@MV_PAGE@@">
<!-- Netscape doesn't like > in the hidden string... -->
<INPUT
TYPE=hidden
NAME=mv_sql_query
VALUE="select * from products where category = category
and price >= min_price
and price <= max_price
">
<SELECT NAME=category>
[query list=1
sql="select distinct category from products order by category"]
<OPTION>[sql-code]</OPTION>
[/query]
</SELECT>
<BR>
Min price<SELECT NAME=min_price>
<OPTION value=""> No minimum
<OPTION>10
<OPTION>15
<OPTION>20
<OPTION>25
</SELECT>
Max price<SELECT NAME=max_price>
<OPTION value=""> No maximum
<OPTION>10
<OPTION>15
<OPTION>20
<OPTION>25
<OPTION>50
</SELECT>
<INPUT TYPE=submit>
</FORM>
<P>
[search-region]
[search-list]
[item-param sku] [item-param price] [item-param category]<BR>
[/search-list]
[search-error]
[/search-region]
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
_______________________________________________
Interchange-users mailing list
Interchange-users@www.minivend.com
http://www.minivend.com/mailman/listinfo/interchange-users