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:

changing prices in cart (1997) Cart vs database (1998) no global [username] or [password] displayed ... (1997) Requiring that certain fields be completed (1997) Need help with emailer- 2 issues (1997) [WebDNA] Test - no messages since 9th of June 2009. (2009) 2.0 Info (1997) Extended [Convertchars] needed (1997) Date search and sendmail (1997) Updating a database once per day - An example (1998) [WebDNA] [BULK] Problem in Database "\x0B" (2011) Mac v. NT (1998) Add (1998) b12 cannot limit records returned and more. (1997) [OT] Domain Management (2003) YACBQ.....(Yet another checkbox question) (2000) question about checkboxes (1999) Tracking inbound links for discounts (1997) template cache problem (1998) Wierd thing in ViewOrder.tpl (1999)