Re: [WebDNA] Search Problem

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107311
interpreted = N
texte = --Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 William I have taken your hint of using a showif, I was hoping that it could = have been done in the SEARCH. [TEXT]THISREGION=3D[Middle StartAfter=3Ddomainname][ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders][/Middle][/TEXT] [SEARCH db=3D^data/celmecproducts.db&neREGIONdatarq=3DALL] [FoundItems] [SHOWIF [REGION]^[THISREGION];] [PRODUCTNAME]
[/SHOWIF] [/FoundItems] [/SEARCH] Thanks Stuart :) On 01/09/2011, at 7:28 PM, William DeVaul wrote: > If you want this to work, just inside the founditems of the search > (which sounds like it can be over-inclusive but not under) I'd try > something like: >=20 > [founditems] > [listwords words=3D[region]&delimiter=3D;] > [showif [word]=3D.com] >=20 > [/showif] > [/listwords] > [/founditems] >=20 > Bill >=20 > On Thu, Sep 1, 2011 at 3:54 AM, Stuart Tremain = wrote: >> Hi Guys >> I have a product db that sells different product to different = regions. >> The db looks something like this >> SKU PRODUCTNAME REGION >> 1 red .com; >> 2 blue .com;.com.au; >> 3 green .com.au; >> 4 yellow .co.uk >> As you can see I am determining the regions from the HTTP_HOST >> - [ListMIMEHeaders name=3DHTTP_HOST][value][/ListMIMEHeaders] >> I am having a bit of a problem with the search though >> This works OK due to .co.uk >> [SEARCH >> = db=3D^data/celmecproducts.db&woREGIONSdatarq=3D.co.uk®IONword=3Dww®I= ONSwbrk=3D;] >> But if I use .com the green product also shows ( I should only get = red & >> blue) >> I could do the db in a different format but it would be nice to get = this to >> work. >> Any ideas ?? >> Thanks :) >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >> --------------------------------------------------------- This = message is >> sent to you because you are subscribed to the mailing list . To = unsubscribe, >> E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug >> Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 William

I have taken your hint of using a showif, I = was hoping that it could have been done in the = SEARCH.

[TEXT]THISREGION=3D[Middle = StartAfter=3Ddomainname][ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders][/Middle][/TEXT]

[SEARCH = db=3D^data/celmecproducts.db&neREGIONdatarq=3DALL]
[FoundItems]
[SHOWIF = [REGION]^[THISREGION];]
[PRODUCTNAME]<BR>
[/SHOWIF]
[/FoundItems]
[/SEARCH]

Thanks
Stuart = :)





On 01/09/2011, at 7:28 PM, = William DeVaul wrote:

If = you want this to work, just inside the founditems of the = search
(which sounds like it can be over-inclusive but not under) I'd = try
something like:

[founditems]
[listwords = words=3D[region]&delimiter=3D;]
[showif = [word]=3D.com]

[/showif]
[/listwords]
[/founditems]

Bi= ll

On Thu, Sep 1, 2011 at 3:54 AM, Stuart Tremain <webdna@idfk.com.au> = wrote:
Hi Guys
I have a product db that sells different product to = different regions.
The db = looks something like this
SKU =      PRODUCTNAME     =  REGION
1     =        red             =                   =  .com;
2     =        blue           =                   =  .com;.com.au;
3   =          green         =                   =  .com.au;
4     =        yellow           =                 = .co.uk
As you can see I am = determining the regions from the HTTP_HOST
- [ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders]
I am having a bit of a problem with the search = though
This works OK due to = .co.uk
[SEARCH
db=3D^data/celmecproducts.db&woREGIONSdatarq=3D.co.uk&am= p;REGIONword=3Dww&REGIONSwbrk=3D;]
But if I use .com the green product also shows ( I should = only get red &
blue)
I could do = the db in a different format but it would be nice to get this = to
work.
Any ideas = ??
Thanks = :)
Stuart = Tremain
IDFK Web = Developments
AUSTRALIA
webdna@idfk.com.au
=



--------------------------------------------------------- = This message is
sent to you = because you are subscribed to the mailing list . To = unsubscribe,
E-mail to: = archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug
Reporting: support@webdna.us
--= -------------------------------------------------------
This message = is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archi= ves: http://mail.webdna.us/l= ist/talk@webdna.us
Bug Reporting: support@webdna.us

= --Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Search Problem (Stuart Tremain 2011)
  2. Re: [WebDNA] Search Problem (Govinda 2011)
  3. Re: [WebDNA] Search Problem (Brian Fries 2011)
  4. Re: [WebDNA] Search Problem (Kenneth Grome 2011)
  5. Re: [WebDNA] Search Problem (Stuart Tremain 2011)
  6. Re: [WebDNA] Search Problem (Kenneth Grome 2011)
  7. Re: [WebDNA] Search Problem (Stuart Tremain 2011)
  8. Re: [WebDNA] Search Problem (Tom Duke 2011)
  9. Re: [WebDNA] Search Problem (Stuart Tremain 2011)
  10. Re: [WebDNA] Search Problem (William DeVaul 2011)
  11. Re: [WebDNA] Search Problem (Tom Duke 2011)
  12. [WebDNA] Search Problem (Stuart Tremain 2011)
--Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 William I have taken your hint of using a showif, I was hoping that it could = have been done in the SEARCH. [text]THISREGION=3D[Middle StartAfter=3Ddomainname][ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders][/Middle][/TEXT] [SEARCH db=3D^data/celmecproducts.db&neREGIONdatarq=3DALL] [founditems] [SHOWIF [REGION]^[THISREGION];] [PRODUCTNAME]
[/SHOWIF] [/FoundItems] [/SEARCH] Thanks Stuart :) On 01/09/2011, at 7:28 PM, William DeVaul wrote: > If you want this to work, just inside the founditems of the search > (which sounds like it can be over-inclusive but not under) I'd try > something like: >=20 > [founditems] > [listwords words=3D[region]&delimiter=3D;] > [showif [word]=3D.com] >=20 > [/showif] > [/listwords] > [/founditems] >=20 > Bill >=20 > On Thu, Sep 1, 2011 at 3:54 AM, Stuart Tremain = wrote: >> Hi Guys >> I have a product db that sells different product to different = regions. >> The db looks something like this >> SKU PRODUCTNAME REGION >> 1 red .com; >> 2 blue .com;.com.au; >> 3 green .com.au; >> 4 yellow .co.uk >> As you can see I am determining the regions from the HTTP_HOST >> - [ListMIMEHeaders name=3DHTTP_HOST][value][/ListMIMEHeaders] >> I am having a bit of a problem with the search though >> This works OK due to .co.uk >> [SEARCH >> = db=3D^data/celmecproducts.db&woREGIONSdatarq=3D.co.uk®IONword=3Dww®I= ONSwbrk=3D;] >> But if I use .com the green product also shows ( I should only get = red & >> blue) >> I could do the db in a different format but it would be nice to get = this to >> work. >> Any ideas ?? >> Thanks :) >> Stuart Tremain >> IDFK Web Developments >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >> --------------------------------------------------------- This = message is >> sent to you because you are subscribed to the mailing list . To = unsubscribe, >> E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug >> Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 William

I have taken your hint of using a showif, I = was hoping that it could have been done in the = SEARCH.

[text]THISREGION=3D[Middle = StartAfter=3Ddomainname][ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders][/Middle][/TEXT]

[SEARCH = db=3D^data/celmecproducts.db&neREGIONdatarq=3DALL]
[founditems]
[SHOWIF = [REGION]^[THISREGION];]
[PRODUCTNAME]<BR>
[/SHOWIF]
[/FoundItems]
[/SEARCH]

Thanks
Stuart = :)





On 01/09/2011, at 7:28 PM, = William DeVaul wrote:

If = you want this to work, just inside the founditems of the = search
(which sounds like it can be over-inclusive but not under) I'd = try
something like:

[founditems]
[listwords = words=3D[region]&delimiter=3D;]
[showif = [word]=3D.com]

[/showif]
[/listwords]
[/founditems]

Bi= ll

On Thu, Sep 1, 2011 at 3:54 AM, Stuart Tremain <webdna@idfk.com.au> = wrote:
Hi Guys
I have a product db that sells different product to = different regions.
The db = looks something like this
SKU =      PRODUCTNAME     =  REGION
1     =        red             =                   =  .com;
2     =        blue           =                   =  .com;.com.au;
3   =          green         =                   =  .com.au;
4     =        yellow           =                 = .co.uk
As you can see I am = determining the regions from the HTTP_HOST
- [ListMIMEHeaders = name=3DHTTP_HOST][value][/ListMIMEHeaders]
I am having a bit of a problem with the search = though
This works OK due to = .co.uk
[SEARCH
db=3D^data/celmecproducts.db&woREGIONSdatarq=3D.co.uk&am= p;REGIONword=3Dww&REGIONSwbrk=3D;]
But if I use .com the green product also shows ( I should = only get red &
blue)
I could do = the db in a different format but it would be nice to get this = to
work.
Any ideas = ??
Thanks = :)
Stuart = Tremain
IDFK Web = Developments
AUSTRALIA
webdna@idfk.com.au
=



--------------------------------------------------------- = This message is
sent to you = because you are subscribed to the mailing list . To = unsubscribe,
E-mail to: = archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug
Reporting: support@webdna.us
--= -------------------------------------------------------
This message = is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archi= ves: http://mail.webdna.us/l= ist/talk@webdna.us
Bug Reporting: support@webdna.us

= --Apple-Mail=_6D3BD6E3-95E4-49AD-AA2C-CC85018A4CD1-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Searching Multiple DBs (1997) WebMerchant 1.6 and SHTML (1997) RE: ShowNext Command (1997) Variable prices and Formulas.db (1997) WebCatalog f2 Installation (1997) What Country (2004) How to find 100 most recent additions. (1997) Shipcost lookup? (1997) Oh yes, it's Encrypt and Decrypt again (2005) Virtual hosting and webcatNT (1997) Help formatting search results w/ table (1997) [ShowNext] (1997) Ok here is a question? (1997) Emailer (1997) [delete] problem (1997) [WebDNA] SpeedTest (2009) Frames and WebCat (1997) Re:HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) Not reading code (1997) Secure server question (1997)