Re: [WebDNA] Text Variable in Search
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105376
interpreted = N
texte = This is a multi-part message in MIME format.------=_NextPart_000_000E_01CB1080.29C4C210Content-Type: text/plain;charset="iso-8859-1"Content-Transfer-Encoding: quoted-printableFrom: sgbc cebu=20Sent: Sunday, June 20, 2010 1:29 PMTo: talk@webdna.us=20Subject: [WebDNA] Text Variable in SearchNot totally sure what you're trying to do, but your argument (ge) =requires that SKU is *greater than or equal to* 0, so you also need to =tell the search query to treat the SKU field as a number for this =search, otherwise it can't make a numerical comparison:[search db=3Dinc/content.db&geSKUdata=3D0&SKUtype=3DnumSKUsort=3D1] [founditems] [showif [url][Slideshow][/url]=3D[url]YES[/url]] [text]YES=3DRockU[/text] [/showif] [/founditems][/search][YES]Also, not sure why you double-bracketed [Slideshow], but I removed the =second set of brackets, and if there are more than one SKUs that are =greater than or equal to 0 then you're going to get the value for the =last record in the [founditems] loop.If you are just making an example for learning purposes then hopefully =my code will help your understanding, but if this is fr an actual =project, I'd want to know more about what you're trying to do before I =said my code was the best solution.=20-Dan----------------------------------------Had difficulty of pulling a text variable via a database.Please consider this code:=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D[text]YES=3DRockU[/text][search db=3Dinc/content.db&geSKUdata=3D0&SKUsort=3D1][founditems][[Slideshow]][/founditems][/search]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DWhere [SlideShow] either will get a YES or a NO from database.The problem is when [SlideShow] tells "YES".It will appear "[Yes]" on the page instead of "Rocku"Thanks------=_NextPart_000_000E_01CB1080.29C4C210Content-Type: text/html;charset="iso-8859-1"Content-Transfer-Encoding: quoted-printable
Sent: Sunday, June 20, 2010 1:29 PM
Subject: [WebDNA] Text Variable in Search
Not totally sure what you're trying to =do, but your=20argument (ge) requires that SKU is *greater than or equal to* 0, so you =also=20need to tell the search query to treat the SKU field as a number =for this=20search, otherwise it can't make a numerical comparison:
[search=20db=3Dinc/content.db&geSKUdata=3D0&SKUtype=3DnumSKUsort=3D1]
&n=bsp; [founditems]
[showif =[url][Slideshow][/url]=3D[url]YES[/url]]
&n=bsp;[text]YES=3DRockU[/text]
[/showif]
[/founditems]
[/search]
[YES]
Also, not sure why you double-bracketed =[Slideshow], but I removed the second set of brackets, and if there are =more=20than one SKUs that are greater than or equal to 0 then you're going to =get the=20value for the last record in the [founditems] loop.
If you are just making an example for =learning=20purposes then hopefully my code will help your understanding, but =if this=20is fr an actual project, I'd want to know more about what you're trying =to do=20before I said my code was the best solution.
-Dan
----------------------------------------
Had difficulty of pulling a text variable via a=20database.
Please consider this=20code:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[text]YES=3DRockU[/text]
[search=20db=3Dinc/content.db&geSKUdata=3D0&SKUsort=3D1]
[founditems]
[[Slideshow]]
[/founditems]
[/search]
=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D
Where=20[SlideShow] either will get a YES or a NO from database.
The =problem is=20when [SlideShow] tells "YES".
It will appear "[Yes]" on the page =instead of=20"Rocku"
Thanks
------=_NextPart_000_000E_01CB1080.29C4C210--
Associated Messages, from the most recent to the oldest:
This is a multi-part message in MIME format.------=_NextPart_000_000E_01CB1080.29C4C210Content-Type: text/plain;charset="iso-8859-1"Content-Transfer-Encoding: quoted-printableFrom: sgbc cebu=20Sent: Sunday, June 20, 2010 1:29 PMTo: talk@webdna.us=20Subject: [WebDNA] Text Variable in SearchNot totally sure what you're trying to do, but your argument (ge) =requires that SKU is *greater than or equal to* 0, so you also need to =tell the search query to treat the SKU field as a number for this =search, otherwise it can't make a numerical comparison:[search db=3Dinc/content.db&geSKUdata=3D0&SKUtype=3DnumSKUsort=3D1] [founditems] [showif [url][Slideshow][/url]=3D[url]YES[/url]] [text]YES=3DRockU[/text] [/showif] [/founditems][/search][YES]Also, not sure why you double-bracketed [Slideshow], but I removed the =second set of brackets, and if there are more than one SKUs that are =greater than or equal to 0 then you're going to get the value for the =last record in the [founditems] loop.If you are just making an example for learning purposes then hopefully =my code will help your understanding, but if this is fr an actual =project, I'd want to know more about what you're trying to do before I =said my code was the best solution.=20-Dan----------------------------------------Had difficulty of pulling a text variable via a database.Please consider this code:=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D[text]YES=3DRockU[/text][search db=3Dinc/content.db&geSKUdata=3D0&SKUsort=3D1][founditems][[Slideshow]][/founditems][/search]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DWhere [SlideShow] either will get a YES or a NO from database.The problem is when [SlideShow] tells "YES".It will appear "[Yes]" on the page instead of "Rocku"Thanks------=_NextPart_000_000E_01CB1080.29C4C210Content-Type: text/html;charset="iso-8859-1"Content-Transfer-Encoding: quoted-printable
Sent: Sunday, June 20, 2010 1:29 PM
Subject: [WebDNA] Text Variable in Search
Not totally sure what you're trying to =do, but your=20argument (ge) requires that SKU is *greater than or equal to* 0, so you =also=20need to tell the search query to treat the SKU field as a number =for this=20search, otherwise it can't make a numerical comparison:
[search=20db=3Dinc/content.db&geSKUdata=3D0&SKUtype=3DnumSKUsort=3D1]
&n=bsp;
[founditems] &n=bsp;
[text]YES=3DRockU[/text]
[/showif]
[/founditems]
[/search]
[YES]
Also, not sure why you double-bracketed =[Slideshow], but I removed the second set of brackets, and if there are =more=20than one SKUs that are greater than or equal to 0 then you're going to =get the=20value for the last record in the [founditems] loop.
If you are just making an example for =learning=20purposes then hopefully my code will help your understanding, but =if this=20is fr an actual project, I'd want to know more about what you're trying =to do=20before I said my code was the best solution.
-Dan
----------------------------------------
Had difficulty of pulling a text variable via a=20database.
Please consider this=20code:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[text]YES=3DRockU[/text]
[search=20db=3Dinc/content.db&geSKUdata=3D0&SKUsort=3D1]
[founditems]
[[Slideshow]]
[/founditems]
[/search]
=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D
Where=20[SlideShow] either will get a YES or a NO from database.
The =problem is=20when [SlideShow] tells "YES".
It will appear "[Yes]" on the page =instead of=20"Rocku"
Thanks
------=_NextPart_000_000E_01CB1080.29C4C210--
"Dan Strong"
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:
Items XX to XX shown (1997)
Associative lookup style? + bit more (1997)
Showif Context combined with Search (1997)
Undocumented changes create problems in webcat 4 ... (2000)
HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997)
Dynamic Pop up menu? (1997)
[WebDNA] An actual attempt to get WebDNA and MAMP Pro to work - (2018)
can we get string variables? (1998)
Displaying backgrounds (1999)
[WebDNA] Can't see were it's wrong.... (2017)
Cart vs database (1998)
using showpage and showcart commands (1996)
Multiply prices (1997)
New Mac Public Beta Available (1997)
select multiple 2 more cents (1997)
PCS Frames (1997)
hmmm (2006)
ups quickcost [repost] (1999)
Field name-subcategory (1997)
form posts expiring instantly... why? (2000)