search comparison problem

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34495
interpreted = N
texte = I'm working on a site for submitting classified ads online. We charge by the word for classified ads, and the per word rate changes depending on the number of words in the ad.I may have included way more info here than I needed to in order for someone to answer my question.I have the following code in my test page (I chopped it into separate lines so it will hopefully be easier to read compared to what the email linebreaks do to it):[text]__wordCount=[CountWords][__ad_body][/CountWords][/text] [search db=rates.db &geMIN_DAYSdatarq=[__wordCount] &leMAX_DAYSdatarq=[__wordCount] &max=8] [founditems][RATE][/founditems] [/search]The rates.db file contains records that look like this:RATE_ID MIN_DAYS MAX_DAYS RATE 01 1 1 36 02 2 2 35 03 3 3 26 04 4 6 22 04 7 9 19.5 05 10 13 14.5 06 14 20 13.9 07 21 29 11.8 08 30 30 11.5If I do a search where __wordCount equals 1, 2, 3, or 30 it finds 1 match and outputs the correct number for [RATE]. However, if I do a search on any other number (i.e., one where I need to evaluate: MIN_DAYS < __wordCount < MAX_DAYSit finds 0 in the search.How do I need to formulate my search correctly to have it come out correctly?Any help would be greatly appreciated.Thanks,Steve------------------------------------------------ Steven Jarvis Web Developer sjarvis@nwaonline.netMorning News of Northwest Arkansas http://www.nwaonline.net ------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. search comparison problem (Steven Jarvis 2000)
I'm working on a site for submitting classified ads online. We charge by the word for classified ads, and the per word rate changes depending on the number of words in the ad.I may have included way more info here than I needed to in order for someone to answer my question.I have the following code in my test page (I chopped it into separate lines so it will hopefully be easier to read compared to what the email linebreaks do to it):[text]__wordCount=[countwords][__ad_body][/CountWords][/text] [search db=rates.db &geMIN_DAYSdatarq=[__wordCount] &leMAX_DAYSdatarq=[__wordCount] &max=8] [founditems][RATE][/founditems] [/search]The rates.db file contains records that look like this:RATE_ID MIN_DAYS MAX_DAYS RATE 01 1 1 36 02 2 2 35 03 3 3 26 04 4 6 22 04 7 9 19.5 05 10 13 14.5 06 14 20 13.9 07 21 29 11.8 08 30 30 11.5If I do a search where __wordCount equals 1, 2, 3, or 30 it finds 1 match and outputs the correct number for [RATE]. However, if I do a search on any other number (i.e., one where I need to evaluate: MIN_DAYS < __wordCount < MAX_DAYSit finds 0 in the search.How do I need to formulate my search correctly to have it come out correctly?Any help would be greatly appreciated.Thanks,Steve------------------------------------------------ Steven Jarvis Web Developer sjarvis@nwaonline.netMorning News of Northwest Arkansas http://www.nwaonline.net ------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Steven Jarvis

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:

vs (1997) OT - ImageMagick on MacOS X (2004) WebDNA v5 Hosting (2003) Searching Dates (2000) Bug Report, maybe (1997) WC2b15 File Corruption (1997) WCS Newbie question (1997) WebDNA on OS X Tiger (2006) TCPConnect / TCPSend to Solaris NN Enterprise (2002) WC2.0 Memory Requirements (1997) Does ".tpl" index with SE's? (2003) page redirect in webDNA (1997) turning every 5th line red (1998) New WebDNA Example from Olin -- (1998) WebCatalog and WebMerchant reviewed by InfoWorld (1997) Email (1998) Problems with ^ could be solved with [REPLACE CHARACTERS] (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) Cart Unique After Rolling Back Time? (2001) Formating found categories (1997)