[ic] Interchange link - SQL link ?

Michelle Wilant interchange-users@interchange.redhat.com
Sun Dec 9 00:43:01 2001


Michelle Wilant wrote:

> I understand your dilemma.  Same here.  Here's how I would approach it.
>
>
> You need to set it up in form style.  Create some variable name for 
> what category you want to submit to your query and make a link out of 
> it.  Such as:
>
> <a href=" 
> http://www.yourstorehere.com/cgi-bin/pbg/categoryresults.html?foo=bar >
>
> Then, in your categoryresults.html setting up your query and filling 
> in the blanks.  To draw your varable(s) out of the buffer use the [cgi 
> foo] tag.
>
> My example (we sell books so it looks a little different). This is 
> also a good example for how to join queries.
>
> [if cgi a ne ""]
>         [query sql="select distinct(t1.isbn), t1.copy_date, 
> t1.pub_date, t1.title, t1.category, t1.subtitle, t1.price, t1.eisbn
>                 from products as t1,
>                 author2isbn as t2
>                 where t1.isbn = t2.isbn
>                 and (t2.authorcode = '[cgi a]')
>                 order by t1.title asc limit 100" type=list]
> [/if]
>
>
> or another example of ours is:
>
> [if cgi q ne ""]
>         [query sql="select distinct(t1.isbn), t1.copy_date, 
> t1.pub_date, t1.title, t1.category, t1.subtitle, t1.price, t1.eisbn
>                 from products as t1,
>                 author2isbn as t2
>                 where t1.isbn = t2.isbn 
>                 and (t1.isbn like '%[cgi q]%'
>                 or t1.title like '%[cgi q]%'
>                 or t1.subtitle like '%[cgi q]%'
>                 or t1.category like '%[cgi q]%'
>                 or t2.fname like '%[cgi q]%'
>                 or t2.lname like '%[cgi q]%'
>                 and t1.ebook != 'F'
>                 and t1.ebook != 'Y')
>                 order by t1.title limit 100" type=list]
> [/if]
>
>
> My only disclaimer to all of this is that I haven't tested this idea 
> in full with the side links.  I'm not sure if there will be problem 
> with the customer's cart -- keeping track of it.  I would be 
> interested to know what success/problems you have with it.  
>
> Michelle
>
>
>
> joachim.richter wrote:
>
>>Hi list,
>>
>>I just bought this MYSQL book and I am truely amazed of what it can do.
>>
>>The biggest problem I am running into at the moment is changing the links. 
>>
>>Because I don't know how to change a regular link to an SQL style link
>>
>><a href="[area scan
>>file=products
>>st=sql
>>co=1
>>sf=category
>>se=TEST
>>ml=10
>>]"
>>
>>>CLICK ME</a>
>>>
>>
>>let's say this link points to the results page, do I build the results page like 
>>
>>[search-region][list][sql-field category][sql-description][/list][/search-region] ? 
>>
>>
>>Can anybody point me in the right direction by giving me a hint or the location in the tutorial / docs on how to do this ?
>>
>>thanx JoE
>>
>>
>>US Video Center Medien GmbH
>>Heimsheimer Str 22
>>70499 Stuttgart
>>
>>Tel 0711 880252 0
>>Fax 0711 880252 22
>>Email joachim.richter@usvideocenter.de
>>
>>_______________________________________________
>>interchange-users mailing list
>>interchange-users@interchange.redhat.com
>>http://interchange.redhat.com/mailman/listinf
>>o/interchange-users
>>
>>.
>>
>