Re: sort by day of week...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49982
interpreted = N
texte = I don't believe this can be done in a single search - you could do two searches, one for geDAYdata and a second for ltDAYdata.Or, if using WebDNA 5, you could put all found records in a table, adding 7 to the day for events happening before today, then search the table sorting by the modified day which on a Wednesday would have a value in the range 3-9).- brianOn Saturday, May 3, 2003, at 10:47 AM, Joe D'Andrea wrote:> Given a database or regularly scheduled events that are stored as the > day of the week they happen and the name of the happening itself. like > this: > > DAY\tEVENT > 0\tsomething for Sunday > 1\tsomething for Monday > 2\tTuesday event > 5\tskip to Friday > 0\tanother Sunday one > 3\Wednesday schedule > > And given that we know what day today is [date format=%w] > > I can figure out how to search the database so that today's items are > sorted at the top like this: > > [search db=events.db&geDAYdatarq=[date > format=%w]&asDAYsort=1&DAYtype=num] > > And then I'd have to go through some machinations to get the rest of > the days in a second search. What I'd want on Saturday is > > Saturday > Sunday > Monday > Tuesday > ... > Friday > > But if today is Wednesday, I'd want: > > Wednesday > Thursday > Friday > ... > Monday > Tuesday > > Anyone have a cool trick to do this in one search? > > ~joe > -- > ____________________________________________________________ > Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com > WEST21.com Internet services for the 21st Century > webhosting ~ co-location ~ wireless access > WebCat and MGI database programming > ____________________________________________________________ > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: sort by day of week... (Brian Fries 2003)
  2. sort by day of week... (Joe D'Andrea 2003)
I don't believe this can be done in a single search - you could do two searches, one for geDAYdata and a second for ltDAYdata.Or, if using WebDNA 5, you could put all found records in a table, adding 7 to the day for events happening before today, then search the table sorting by the modified day which on a Wednesday would have a value in the range 3-9).- brianOn Saturday, May 3, 2003, at 10:47 AM, Joe D'Andrea wrote:> Given a database or regularly scheduled events that are stored as the > day of the week they happen and the name of the happening itself. like > this: > > DAY\tEVENT > 0\tsomething for Sunday > 1\tsomething for Monday > 2\tTuesday event > 5\tskip to Friday > 0\tanother Sunday one > 3\Wednesday schedule > > And given that we know what day today is [date format=%w] > > I can figure out how to search the database so that today's items are > sorted at the top like this: > > [search db=events.db&geDAYdatarq=[date > format=%w]&asDAYsort=1&DAYtype=num] > > And then I'd have to go through some machinations to get the rest of > the days in a second search. What I'd want on Saturday is > > Saturday > Sunday > Monday > Tuesday > ... > Friday > > But if today is Wednesday, I'd want: > > Wednesday > Thursday > Friday > ... > Monday > Tuesday > > Anyone have a cool trick to do this in one search? > > ~joe > -- > ____________________________________________________________ > Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com > WEST21.com Internet services for the 21st Century > webhosting ~ co-location ~ wireless access > WebCat and MGI database programming > ____________________________________________________________ > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- 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://webdna.smithmicro.com/ Brian Fries

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:

PC Auth Hub+Merchant (1998) What is the default seed for the encrypt context? (2000) Secure server question (1997) [WebDNA] v7 success story (2012) Today's suggestions - 2 More (1998) Windows 2.1b2 Append Bug? (1997) Unix DB Permission Error (2002) showif with math? (2000) system crashes, event log (1997) Grant, please help me ... (1997) WC1.6 to WC2 date formatting -FIXED! (1997) Virtual hosting and webcatNT (1997) Webten 4.0 Plugin Question (2000) MasterCounter - Does this work?? (1999) Howard Wolosky Please contact me (2003) BUG in [showif] using ^ (contains) (1997) Re:no template caching (1997) Major bug report on rootbeer (1997) REVISED: Help needed: older WebCat app breaks under 4.0.1 (2000) url value (2002)