in reply to MySQL query question...

You could use some of the DateTime modules for this kind of thing (you'd need to do something a bit different to make the recurrence logic jump from one Wednesday to the next):
use strict; use DateTime::Set; use DateTime::Format::MySQL; my ($d1,$d2) = (DateTime->now(),DateTime->now()->add(days=>7)); my $set = DateTime::Set->from_recurrence( after => $d1, before => $d2, recurrence => sub { $_[0]->truncate(to=>'day')->add(days=>1) }, ); my @dates = map { DateTime::Format::MySQL->format_date($_) } $set->as_list; # @dates now contains a list of MySQL looking date strings
I've also done the same thing in the past by using MySQL's from_days() function. This "works" but is probably not recommended
# non-production-ready code follows my ($start_day,$end_day) = $dbh->selectrow_array("select to_days(now() +), to_days(now() + interval 7 day)"); my @dates = map { $dbh->selectrow_array("select from_days($_)") } $start_day .. $end_day;