Ampersand is breaking search context
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 22703
interpreted = N
texte = Hello, I'm still having trouble understanding what exactly is happening when an& (ampersand) is in a db field. I have a db that has sku,type,artist, andtitle as it's field names. I do a search for an sku to find a uniqueproduct:[search db=Catalog.db&eqskudata=250980211&cart=2999507845187][founditems]Which brings up a product listing. Within that founditems loop, I doanother search to find matching [artist] and [title] records with different[sku] numbers:[search db=Catalog.db&eqArtistdatarq=[Artist]&eqTitledatarq=[Title]]This product is available in the following product types:
[founditems][sku], [type]
[/founditems][/search][/founditems][/search]This works fine and finds the matching records until an ampersand is presentin the [artist] field for that record. The inner search then finds nomatches. If I update the database by substituting the word and for theampersand, the search works again. If I wrap the [Artist] and [Title] in a[url] context, like:[searchdb=Catalog.db&eqArtistdatarq=[url][Artist][/url]&eqTitledatarq=[url][Title][/url]]The search still finds no match. The really baffling thing is, theampersand is in the [Artist] field and yet if I leave the [Artist] criteriaout of the search:[search db=Catalog.db&eqTitledatarq=[Title]] (with or without the [url]wrap)The search still finds no match. Again, if I remove the ampersand from the[Artist] field of the database and use the above search, it finds thematching records, even though I am not using the [Artist] field as part ofthe search.I have read through the talklist archive and have seen discussion that it isusually the browser that has difficulty with the ampersand but this ishappening strictly within *contexts* so the browser has no part in it.So,How do IA: Properly create a form that allows a user to enter a name like Meyer &Frank into a text field that will be appended to my database, andB: Properly construct a search like the above to then find the record thatcontains the ampersand character.Is there a comprehensive discussion on this subject somewhere in thedocumentation? If not, I think it would be a welcome addition, consideringhow many records come up on the subject when searching the talklist archive.Thanks,Mike Davis
Associated Messages, from the most recent to the oldest:
Hello, I'm still having trouble understanding what exactly is happening when an& (ampersand) is in a db field. I have a db that has sku,type,artist, andtitle as it's field names. I do a search for an sku to find a uniqueproduct:[search db=Catalog.db&eqskudata=250980211&cart=2999507845187]
[founditems]Which brings up a product listing. Within that founditems loop, I doanother search to find matching [artist] and [title] records with different[sku] numbers:[search db=Catalog.db&eqArtistdatarq=[Artist]&eqTitledatarq=[Title]]This product is available in the following product types:
[founditems][sku], [type]
[/founditems][/search][/founditems][/search]This works fine and finds the matching records until an ampersand is presentin the [artist] field for that record. The inner search then finds nomatches. If I update the database by substituting the word and for theampersand, the search works again. If I wrap the [Artist] and [Title] in a
[url] context, like:[searchdb=Catalog.db&eqArtistdatarq=
[url][Artist][/url]&eqTitledatarq=
[url][Title][/url]]The search still finds no match. The really baffling thing is, theampersand is in the [Artist] field and yet if I leave the [Artist] criteriaout of the search:[search db=Catalog.db&eqTitledatarq=[Title]] (with or without the
[url]wrap)The search still finds no match. Again, if I remove the ampersand from the[Artist] field of the database and use the above search, it finds thematching records, even though I am not using the [Artist] field as part ofthe search.I have read through the talklist archive and have seen discussion that it isusually the browser that has difficulty with the ampersand but this ishappening strictly within *contexts* so the browser has no part in it.So,How do IA: Properly create a form that allows a user to enter a name like Meyer &Frank into a text field that will be appended to my database, andB: Properly construct a search like the above to then find the record thatcontains the ampersand character.Is there a comprehensive discussion on this subject somewhere in thedocumentation? If not, I think it would be a welcome addition, consideringhow many records come up on the subject when searching the talklist archive.Thanks,Mike Davis
Mike_Davis
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:
searchable list archive (1997)
[WebDNA] WebDNA-folder-Mac-FastCGI-8.5.1.zip (404 error) (2018)
Help formatting search results w/ table (1997)
select multiple 2 more cents (1997)
SSL and WebCatalog (1997)
Charting records by state (2000)
Add a Blog to your site. (2002)
WebCatalog/Mac 2.1b2 New Features (1997)
WCS Newbie question (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
Wrapping text (1998)
[applescript] (1999)
Price Hacking (1998)
[countWords]? (1997)
Template not found error messages (1997)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
WebCatalog for guestbook ? (1997)
I have observed and I am gone. (1998)
insert graphic in email (2000)
Status? (2000)