List:General Discussion« Previous MessageNext Message »
From:Jonathan Mangin Date:January 4 2006 7:22pm
Subject:Re: Calendar table workaround
View as plain text  
----- Original Message ----- 
From: "Rhino" <rhino1@stripped>
To: "Jonathan Mangin" <jon.mangin@stripped>
Sent: Wednesday, January 04, 2006 1:25 PM
Subject: Re: Calendar table workaround


>
> ----- Original Message ----- 
> From: "Jonathan Mangin" <jon.mangin@stripped>
> To: <mysql@stripped>
> Sent: Wednesday, January 04, 2006 10:45 AM
> Subject: Calendar table workaround
>
>
> >I created a calendar table (date only), but all
> > where clauses include a uid.  Is the following a
> > sane workaround to get a usable calendar table?
> > Anything else I can do?
> >
> > my $sth = $dbh->prepare("
> > create table $temp_tbl
> > (date date,
> > uid varchar(14))
> > select date,
> > ? as uid
> > from calendar
> > where date between ? and ?");
> > $sth->execute($uid, $bdate, $edate);
> >
>
> I have no idea what you are asking, which may explain why no one has
replied
> to your question yet.
>
> I've been working with relational databases for 20 years and I've never
> heard the term "calendar table". What are you trying to accomplish? If you
> describe clearly what you are trying to do, perhaps someone can help you
> devise a way to do it in MySQL.
>
> Rhino
>
>
A table of dates to which to join other tables,
ensuring reports that reflect days for which no
data is available.

Thread
Calendar table workaroundJonathan Mangin4 Jan
  • Re: Calendar table workaroundJonathan Mangin4 Jan
    • Re: Calendar table workaroundPeter Brawley4 Jan
      • SELECT DISTINCT uses index but is still slowJames Harvard4 Jan
        • Inconsistent rows returned & examined in slow query logJames Harvard4 Jan
  • RE: Calendar table workaroundJay Paulson \(CE CEN\)4 Jan
  • Re: Calendar table workaroundJonathan Mangin4 Jan
  • Re: SELECT DISTINCT uses index but is still slowC.R.Vegelin5 Jan
    • Re: SELECT DISTINCT uses index but is still slowJames Harvard5 Jan