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:

read and write you own cookies with webcat (1997) [WriteFile] problems (1997) Search results templates (1996) [tcp connect] (1998) Credit Card not accepted (1998) webcat- multiple selection in input field (1997) Instability Problem (1999) Date search - yes or no (1997) Running 2 two WebCatalog.acgi's (1996) Opinion: [input] should be called [output] ... (1997) Search for dates greater than [date] (1997) Status of variable hierarchy changes? (2000) apostrophe in search item (1997) Show if time tags (1997) .. more on sliding discounts... (1997) decrypt and summ problems (1999) Beta 18 (1997) New NT betas available (1997) website pro trouble (1998) Mass Mail (2000)