MiniVend Akopia Services

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

Re: building categories using sql



******    message to minivend-users from cfm@maine.com     ******

> ******    message to minivend-users from petong <petong@jah.net>     ******

> > > I am attempting to build a list of categories using the following
> > > method:
> > >
> > > [sql type=list
> > >       query="select distinct varietal from products order by varietal
> > >    " ]
> > > [sql-param varietal]
> > > [/sql]
> > >
> > > What I would like to do is to make this a list of links that would
> > > produce a page containing all items that belong in this category. Do I
> > > have to pass the variable to the sql list on the next page to loop out
> > > all the items? I seem to be at a loss on this one. Thanks for the help!
> >
> > build search page links
> > [scan se=<stuff category into mv_searchspec here>] Text here [/page]
> >
> > Search docs for "scan".
> >
> 
> This is actually the desired effect, but I would like to accomplish this without using scan.
> The page build time is too long, so I would rather build the page directly from a second sql
> query. Let's say that I build a list using the above query. If someone clicks on a varietal
> such as 'merlot', I would like the next page to contain a query like so:

I may be a bit fast-and-loose with the terminology but scan is really just 
telling minivend to treat the path info a certain way.  The scan page 
itself would be just like this:

> 
> [sql type=list
>       query="select code,title,year,varietal,vineyard, from products where varietal like
> '[value varietal]' order by title
>    " ]
> 
> [sql-param code] [sql-param title] etc...
> 
> [/sql]

except that [value varietal] would be [value mv_searchspec].  Then you can use
just links.  If you want to use [value varietal] you could build
your category page as a form so minivend would see varietal.  The downside of
using values outside of searchspec is that you have to remember to destroy them.
<FORM>
sql loop
<INPUT NAME=varietal TYPE=RADIO VALUE=$varietal>
/sql
</FORM>

There is no reason in and of itself that a `scan' page would take long
to build. 

cfm

-- 

Christopher F. Miller, Publisher                            cfm@maine.com
MaineStreet Communications, Inc        208 Portland Road, Gray, ME  04039
1.207.657.5078  (MTRF 3-5pm)                        http://www.maine.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: