[ic] *** Interchange 4.6 & PgSQL Difficulties ***

Mike Heins mikeh@minivend.com
Sat, 2 Dec 2000 14:56:11 -0500

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:
> 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... -->
        VALUE="select * from products where category = category
                    and price &gt;= min_price
                    and price <=    max_price
    <SELECT NAME=category>
    [query list=1
        sql="select distinct category from products order by category"]
    Min price<SELECT NAME=min_price>
        <OPTION value=""> No minimum
    Max price<SELECT NAME=max_price>
        <OPTION value=""> No maximum
    <INPUT TYPE=submit>
            [item-param sku] [item-param price] [item-param category]<BR>

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