Re: Search bug. Help

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43508
interpreted = N
texte = >First I'd like to thank you for tacking the time to help. > >The reason I can't do multiple searches is because the results has about 100 >results per search and the sorting is critical. > >Here is the full search: >[search db=loose-dia.db&eqshapedatarq=rd&woCTdatarq=.20, >.25&CTword=ww&CTwbrk=,&CTtype=num&wocolordatarq=a,b,c&woclaritydatarq=vvs1,v >vs2&colorsort=1&colorsdir=as&claritysort=2&claritysdir=as&ctsort=3&ctsddir=a >s&startat=[startat]&max=[themax]] > >You see that ct is the last to be sorted. I thought about nesting searches >but it is not feasible because the of the amount of searches it would have >to perform. This is my main search page meaning that many users will be >accessing the page simultaneously and 100 searches per request would be too >much for my server. Not to mention that the page is already littered with >lookups and 3 other searches on other databases. > > I can't do a range search because I want users to be able to omit certain >values that might fit in the range. The way the user decides what values to >search Ct with is with check boxes in the form .25 .33 .50 .60 .50 .75 .100. >They can select any combination not necessarily in order. I see. Well, you can try the group field technique to see if that 'gets around' the problem of searching a field as text while sorting it numerically. Or you can try a different approach ...Store all your CT values in the db so they can be sorted as text without having to use the &CTtype=num parameter. This means you must store all of your CT values in the exact same numeric format, with the same number of digits on either side of the decimal place.In other words, 1 becomes 1.00, .25 becomes 0.25, etc. Every value would have one digit on the left of the decimal and two digits on the right. When you store numbers like this in your db (assuming there are no values higher than 9.99) they automatically sort properly *without* using &type=num parameter -- and this will eliminate your problem.Of course, if you have really big stones which are larger than 9.99 Carats (or even if you think you might have some that big some day), you should probably use two digits to the left of the decimal point instead of one.Doing this will make your search find and sort the proper records without using the &type=num parameter. Then the only thing left for you to decide is how you want to format those values so they display the way you want them to on your web pages. Getting rid of leading zeros is easy, just put the [ct] tag inside a math context. Other adjustments may require the format context ...:) Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.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. Re: Search bug. Help (John Peacock 2002)
  2. Re: Search bug. Help (Kenneth Grome 2002)
  3. Re: Search bug. Help (Kenneth Grome 2002)
  4. Re: Search bug. Help (Clint Davis 2002)
  5. Re: Search bug. Help (Brian Fries 2002)
  6. Re: Search bug. Help (Andrew Simpson 2002)
  7. Re: Search bug. Help (John Peacock 2002)
  8. Re: Search bug. Help (Kenneth Grome 2002)
  9. Re: Search bug. Help (marc malacarme 2002)
  10. Re: Search bug. Help (Kenneth Grome 2002)
  11. Re: Search bug. Help (Kenneth Grome 2002)
  12. Re: Search bug. Help (marc malacarme 2002)
  13. Re: Search bug. Help (marc malacarme 2002)
  14. Re: Search bug. Help (Kenneth Grome 2002)
  15. Re: Search bug. Help (Andrew Simpson 2002)
  16. Re: Search bug. Help (Kenneth Grome 2002)
  17. Re: Search bug. Help (Brian Fries 2002)
  18. Re: Search bug. Help (Rob Marquardt 2002)
  19. Re: Search bug. Help (Gary Krockover 2002)
  20. Re: Search bug. Help (Rob Marquardt 2002)
  21. Re: Search bug. Help (marc malacarme 2002)
  22. Re: Search bug. Help (marc malacarme 2002)
  23. Re: Search bug. Help (Brian Fries 2002)
  24. Re: Search bug. Help (Brian Boegershausen 2002)
  25. Re: Search bug. Help (Andrew Simpson 2002)
  26. Re: Search bug. Help (marc malacarme 2002)
  27. Re: Search bug. Help (marc malacarme 2002)
  28. Re: Search bug. Help (Glenn Busbin 2002)
  29. Re: Search bug. Help (Brian Boegershausen 2002)
  30. Search bug. Help (marc malacarme 2002)
>First I'd like to thank you for tacking the time to help. > >The reason I can't do multiple searches is because the results has about 100 >results per search and the sorting is critical. > >Here is the full search: >[search db=loose-dia.db&eqshapedatarq=rd&woCTdatarq=.20, >.25&CTword=ww&CTwbrk=,&CTtype=num&wocolordatarq=a,b,c&woclaritydatarq=vvs1,v >vs2&colorsort=1&colorsdir=as&claritysort=2&claritysdir=as&ctsort=3&ctsddir=a >s&startat=[startat]&max=[themax]] > >You see that ct is the last to be sorted. I thought about nesting searches >but it is not feasible because the of the amount of searches it would have >to perform. This is my main search page meaning that many users will be >accessing the page simultaneously and 100 searches per request would be too >much for my server. Not to mention that the page is already littered with >lookups and 3 other searches on other databases. > > I can't do a range search because I want users to be able to omit certain >values that might fit in the range. The way the user decides what values to >search Ct with is with check boxes in the form .25 .33 .50 .60 .50 .75 .100. >They can select any combination not necessarily in order. I see. Well, you can try the group field technique to see if that 'gets around' the problem of searching a field as text while sorting it numerically. Or you can try a different approach ...Store all your CT values in the db so they can be sorted as text without having to use the &CTtype=num parameter. This means you must store all of your CT values in the exact same numeric format, with the same number of digits on either side of the decimal place.In other words, 1 becomes 1.00, .25 becomes 0.25, etc. Every value would have one digit on the left of the decimal and two digits on the right. When you store numbers like this in your db (assuming there are no values higher than 9.99) they automatically sort properly *without* using &type=num parameter -- and this will eliminate your problem.Of course, if you have really big stones which are larger than 9.99 Carats (or even if you think you might have some that big some day), you should probably use two digits to the left of the decimal point instead of one.Doing this will make your search find and sort the proper records without using the &type=num parameter. Then the only thing left for you to decide is how you want to format those values so they display the way you want them to on your web pages. Getting rid of leading zeros is easy, just put the [ct] tag inside a math context. Other adjustments may require the format context ...:) Sincerely, Kenneth Grome--------------------------------------------------- WebDNA Professional Training and Development Center 175 J. Llorente Street +63 (32) 255-6921 Cebu City, Cebu 6000 kengrome@webdna.net Philippines http://www.webdna.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/ Kenneth Grome

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:

Displaying xx number of characters (1997) WCS Newbie question (1997) WebCatalog2 Feature Feedback (1996) Re:Copyright ? (1997) Credit card processing - UK (1997) Attention all list readers (1997) Multihoming and webcat (1998) [WebDNA] mydatabase.db-oRiGiNaL- (2016) MacOS 9 => ODBC=> Ms SQL Server 7 (2000) Shipping charge question (2003) adding shipping cost (1998) Many $WebCat.exe processes (1998) How does WebCatalog search the database? (1997) Major problem (1999) RE: creating writefile data from a nested search (1997) Emailer errors (2000) textarea input (2002) Showif probably dumb question (1997) find with exceptions (1997) Multiple cart additions (1997)