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:

Security Tip (1996) PCS Frames (1997) Physical Proximity searches (2000) webcat method for waiting specific amount of time? (2000) WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997) test (2004) shipcost (1997) RE: creating writefile data from a nested search (1997) Progress (database system) (2003) WC2.0 Memory Requirements (1997) PCS Frames (1997) passing a variable in a pulldown (2005) MATH PROBLEM (1997) [REFERRER] AND Truncation (1998) sort problems....bug or brain fart? (1997) Navigator Parsing (1997) Verifying SSL on Page (2002) [Semi-OT] Eaaaaaasy OSX FTP (2003) Search results templates (1996) Encrypting the seed (2001)