Re: [WebDNA] [lookup] fails when using [url] to wrap a value for potential "&" char?

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103264
interpreted = N
texte = John, I url the values in lookups all the time. The behavior you see could be explained if [ccc] already contains a url'ed value. For example: [text]ccc=[url]&[/url][/text] [lookup db=^db/aaa.db&lookInField=bbb&value=[URL][ccc][/ URL]&returnField=ddd¬Found=eee] This will not find the value "&" because the value got url'ed twice, and the second time encoded the % sign as %25, so the lookup would unurl once and therefore look for the literal string "%26" instead of the desired "&". Brian Fries BrainScan Software On Aug 14, 2009, at 3:41 PM, John Butler wrote: > I am really surprised to see this behavior: > > This: > [lookup db=^db/aaa.db&lookInField=bbb&value=[URL][ccc][/ > URL]&returnField=ddd¬Found=eee] > returns: > eee > > But this: > [lookup db=^db/ > aaa.db&lookInField=bbb&value=[ccc]&returnField=ddd¬Found=eee] > returns: > the value I expect (the value for [ddd] in the found record). > > So then won't the latter (working) lookup break when the 'bbb' field > may contain an "&" char (when we don't use [url])?! > > I can work around with [search].. but what if I need the speed of > the [lookup]? > > -- > Can anyone confirm this? Comment? > > -John > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [lookup] fails when using [url] to wrap a value for potential "&" char? (John Butler 2009)
  2. Re: [WebDNA] [lookup] fails when using [url] to wrap a value for potential "&" char? (John Butler 2009)
  3. Re: [WebDNA] [lookup] fails when using [url] to wrap a value for potential "&" char? (Brian Fries 2009)
  4. [WebDNA] [lookup] fails when using [url] to wrap a value for potential "&" char? (John Butler 2009)
John, I url the values in lookups all the time. The behavior you see could be explained if [ccc] already contains a url'ed value. For example: [text]ccc=[url]&[/url][/text] [lookup db=^db/aaa.db&lookInField=bbb&value=[url][ccc][/ URL]&returnField=ddd¬Found=eee] This will not find the value "&" because the value got url'ed twice, and the second time encoded the % sign as %25, so the lookup would unurl once and therefore look for the literal string "%26" instead of the desired "&". Brian Fries BrainScan Software On Aug 14, 2009, at 3:41 PM, John Butler wrote: > I am really surprised to see this behavior: > > This: > [lookup db=^db/aaa.db&lookInField=bbb&value=[url][ccc][/ > URL]&returnField=ddd¬Found=eee] > returns: > eee > > But this: > [lookup db=^db/ > aaa.db&lookInField=bbb&value=[ccc]&returnField=ddd¬Found=eee] > returns: > the value I expect (the value for [ddd] in the found record). > > So then won't the latter (working) lookup break when the 'bbb' field > may contain an "&" char (when we don't use [url])?! > > I can work around with [search].. but what if I need the speed of > the [lookup]? > > -- > Can anyone confirm this? Comment? > > -John > --------------------------------------------------------- > 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 > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 Brian Fries

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:

[subtotal] problems -- help? (1998) off topic - dna snipets (1997) test (2000) [WebDNA] read database from other domain (2015) RE: WebCatalog and Webstar 3.02 (1998) WebCatalog for guestbook ? (1997) protect tag on NT IIS (1997) test (2004) $Replace with [founditems] (1997) Seeking Better Display of results... (1997) AAAH: stupid sendmail (2001) unclear on a simple [cart] ? (1998) no global [username] or [password] displayed ... (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) [WebDNA] Retrieving a PDF from an email (2008) Showif, Hideif reverse logic ? (1997) several people editing a database. (2001) HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) bug in Webcat OSX (1999) Setting up the server (1997)