Re: Searching for the end

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21509
interpreted = N
texte = The problem isI cant be sure that the tab file i get from the customer has the records in the right way, even not in the same way every time, i dont think that i would be able to use the [cart] tag for thatSHoudn't there be a way to do it, when i do have a unique field called VURDERINGSNUMMER which is always thetype NUM and then afterwards do a sort on my DATE like deVURDERINGSDATOsort&deVURDERINGSDATOtype=date_dmythen the hole string should be[search db=realdb.db&neVURDERINGSNUMMERdata=[blank]&deVURDERINGSNUMMERsort=1&VURDERINGSN UMMERtype=num&deVURDERINGSDATOsort=2&VURDERINGSDATOtype=date_dmy&max=25]That should be it, shouldn't it??? (it came to me while writing this mail, so its not testet yet) /Martin >>The exact thing i need to do is find the last 25 VURDERINGSNUMMER and sort >>it by date in descending order, so the last comes first >>But i can't get it to work :-{ > >I think you *cannot* solve your problem until you create a field whose >value is set at the time the record is created and whose value is larger >than all the other values in the db. > >It's easy to use the [cart] tag for this task, because all you have to do >is put fieldName=[cart] into your append context, and it will >automatically create a unique value that's ALPHABETICALLY the largest >value in the database (assuming you're not passing some other cart value >to the page with the append context in it). > >Then you can do a search that retrieves all the records in the database >(neSKUdatarq=[blank]) and limits the results to 25 records per founditems >context (max=25) and sorts that field in descending order so the LAST 25 >records will be the ones displayed (defieldNamesort=1). > >But right now, you don't have any field in your database that can be >sorted in descending order and still retrieve the last 25 records. And any >other sort you perform will result in having the records returned in a >different order, not in reverse database order. So it seems you need to >create a new field for the purpose of sorting in reverse-database order. > >It would be nice if PCS would consider making a new parameter that does >this for us. We have rank=off to give us our results in database order >--with no sorting at all -- but we have nothing to give us the results in >reverse-database order. > >Perhaps a parameter like dbsort=reverse might be added to the WebDNA >language, which would tell webcat to display the founditems in the >OPPOSITE order from the way they appear in the db. > >Sincerely, >Ken Grome >808-737-6499 >WebDNA Solutions >mailto:ken@webdna.net >http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching for the end (Brian Fries 1998)
  2. Re: Searching for the end (Gary Richter 1998)
  3. Re: Searching for the end (Martin Gertz Bech 1998)
  4. Re: Searching for the end (Kenneth Grome 1998)
  5. Re: Searching for the end (Martin Gertz Bech 1998)
  6. Re: Searching for the end (Dave MacLeay 1998)
  7. Re: Searching for the end (Martin Gertz Bech 1998)
  8. Re: Searching for the end (Kenneth Grome 1998)
  9. Re: Searching for the end (Dave MacLeay 1998)
  10. Searching for the end (Martin Gertz Bech 1998)
The problem isI cant be sure that the tab file i get from the customer has the records in the right way, even not in the same way every time, i dont think that i would be able to use the [cart] tag for thatSHoudn't there be a way to do it, when i do have a unique field called VURDERINGSNUMMER which is always thetype NUM and then afterwards do a sort on my DATE like deVURDERINGSDATOsort&deVURDERINGSDATOtype=date_dmythen the hole string should be[search db=realdb.db&neVURDERINGSNUMMERdata=[blank]&deVURDERINGSNUMMERsort=1&VURDERINGSN UMMERtype=num&deVURDERINGSDATOsort=2&VURDERINGSDATOtype=date_dmy&max=25]That should be it, shouldn't it??? (it came to me while writing this mail, so its not testet yet) /Martin >>The exact thing i need to do is find the last 25 VURDERINGSNUMMER and sort >>it by date in descending order, so the last comes first >>But i can't get it to work :-{ > >I think you *cannot* solve your problem until you create a field whose >value is set at the time the record is created and whose value is larger >than all the other values in the db. > >It's easy to use the [cart] tag for this task, because all you have to do >is put fieldName=[cart] into your append context, and it will >automatically create a unique value that's ALPHABETICALLY the largest >value in the database (assuming you're not passing some other cart value >to the page with the append context in it). > >Then you can do a search that retrieves all the records in the database >(neSKUdatarq=[blank]) and limits the results to 25 records per founditems >context (max=25) and sorts that field in descending order so the LAST 25 >records will be the ones displayed (defieldNamesort=1). > >But right now, you don't have any field in your database that can be >sorted in descending order and still retrieve the last 25 records. And any >other sort you perform will result in having the records returned in a >different order, not in reverse database order. So it seems you need to >create a new field for the purpose of sorting in reverse-database order. > >It would be nice if PCS would consider making a new parameter that does >this for us. We have rank=off to give us our results in database order >--with no sorting at all -- but we have nothing to give us the results in >reverse-database order. > >Perhaps a parameter like dbsort=reverse might be added to the WebDNA >language, which would tell webcat to display the founditems in the >OPPOSITE order from the way they appear in the db. > >Sincerely, >Ken Grome >808-737-6499 >WebDNA Solutions >mailto:ken@webdna.net >http://www.webdna.net Martin Gertz Bech

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:

WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Triggers Suck! (2000) Order not created error (1997) Add all products to cart at once? (1997) Date subtraction (2002) Email notification to one of multiple vendors ? (1997) Validation (2000) Running _every_ page through WebCat ? (1997) If Empty ? (1997) Help! WebCat2 bug (1997) Weird happenings (1998) Date search - yes or no (1997) RE: WebCat and image maps (1997) How to remove comments with grep? (2003) Word wrapping (1997) New Command prefs ... (1997) Logging purchases (1997) won't serve .tpl (2000) Quit revisited (1997) Extended [ConvertChars] (1997)