[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    Re: AW: MySql Calendar
From:       Cynic <cynic () mail ! cz>
Date:       2001-07-30 13:44:56
[Download RAW message or body]

Well, I don't see how filling a table with rows where most of them
will be just nulls is reasonable. The proper way of doing this
would be to insert a row for just the times when an event takes 
place. All you (basically) need is just one table:

CREATE TABLE calendar (
   id bigint(20) unsigned NOT NULL auto_increment,
   ts timestamp(14),
   event char(255) NOT NULL,
   PRIMARY KEY (id),
   KEY ts (ts)
);



At 13:23 7/5/2001, Danny Katcher wrote the following:
-------------------------------------------------------------- 
> his request seems perfectly reasonable to me. 
> 
> as long as the keys are designed correctly it seems like a great idea.
> 
> what you need a little perl script that sets up a loop that increments a date-time \
> variable with each iteration. If I have time today I will look into it.  
> Daniel Katcher
> 202-619-7643 ( voice )
> 202-619-7655 ( fax )
> dkatcher@cfo.usda.gov
> 
> > > > Cynic <cynic@mail.cz> 07/04/01 02:54AM >>>
> 1) keep the list on all replies unless the person who replies
> to your question takes it off the list themselves.
> 
> 2) you should probably by a book on SQL. I can recommend 
> MySQL by Paul DuBois or Handbook of Relational Database Design
> by Fleming & von Halle. Looks like you're lacking in the area
> of database design.
> 
> At 09:26 7/3/2001, Guddack Thorsten ICM MP SCM SCCM PI wrote the following:
> -------------------------------------------------------------- 
> > HI,
> > 
> > I really know to create tables............
> > 
> > But my Problem ist how to put data into a table that has the Structure of a
> > calendar.
> > 
> > Example: All days in a year in one table ( 365 Rows), or all 10min-Periods
> > in a Month ( 31 x 24 x 6 Rows ).
> > 
> > I'm looking for a way to generate the rows automatically...
> > 
> > Bye
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von:  Cynic [SMTP:cynic@mail.cz] 
> > > Gesendet am:  03.07.2001 00:31
> > > An:   Guddack Thorsten ICM MP SCM SCCM PI; 'win32@lists.mysql.com';
> > > 'mysql-help@lists.mysql.com' 
> > > Betreff:      Re: MySql Calendar
> > > 
> > > check the tutorial section of the MySQL manual you got with
> > > your copy of MySQL. it explains how to create tables in case
> > > the rest of the manual is a bit hard to read for you.
> > > 
> > > At 22:55 7/2/2001, Guddack Thorsten ICM MP SCM SCCM PI wrote the
> > > following:
> > > -------------------------------------------------------------- 
> > > 
> > > > Hi,
> > > > 
> > > > Does anybody nows how to create a calendar or a time shedule in mysql?
> > > > 
> > > > I need two tables. One with a Date and one with a time inside.
> > > > 
> > > > The Date-Table should contain all days between two dates....
> > > > 
> > > > for example: All Dates between 30.06.2001 and 25.06.2001
> > > > 2001-06-30
> > > > 2001-06-29
> > > > 2001-06-28
> > > > 2001-06-27
> > > > 2001-06-26
> > > > 2001-06-25
> > > > 
> > > > The Time-Tabel should have all Times in a 10 Min Period between start and
> > > > enddate.
> > > > For example:
> > > > 2001-06-30 00:00:00
> > > > 2001-06-30 00:10:00
> > > > 2001-06-30 00:20:00
> > > > 2001-06-30 00:00:00
> > > > 2001-06-30 00:50:00
> > > > 2001-06-29 00:00:00
> > > > 2001-06-29 00:10:00
> > > > 2001-06-29 00:20:00
> > > > 2001-06-29 00:00:00
> > > > 2001-06-29 00:50:00
> > > > 2001-06-28 00:00:00
> > > > 2001-06-28 00:10:00
> > > > 2001-06-28 00:20:00
> > > > 2001-06-28 00:00:00
> > > > 2001-06-28 00:50:00
> > > > 
> > > > How could I create these tables in MYSQL?
> > > > 
> > > > -------------------------------------------------------------------------
> > > ---
> > > > -------------------
> > > > Thorsten Guddack                   SIEMENS AG
> > > > ICM MD MP SCM SCCM PI                                 Information and
> > > > Communication Mobile -
> > > > 
> > > > Mobile Devices -
> > > > 
> > > > Mobile Phones
> > > > *    +49-2842-95-4270                                   
> > > > Fax   +49-2842-95-4256                                  Südstraße 9
> > > > *   thorsten.guddack@klf.siemens.de          D-47475 Kamp-Lintfort  
> > > > -------------------------------------------------------------------------
> > > ---
> > > > -------------------
> > > > 
> > > > 
> > > > 
> > > > ---------------------------------------------------------------------
> > > > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> > > > posting. To request this thread, e-mail win32-thread6692@lists.mysql.com 
> > > > 
> > > > To unsubscribe, send a message to the address shown in the
> > > > List-Unsubscribe header of this message. If you cannot see it,
> > > > e-mail win32-unsubscribe@lists.mysql.com instead.
> > > ------end of quote------ 
> > > 
> > > 
> > > cynic@mail.cz 
> > > -------------
> > > And the eyes of them both were opened and they saw that their files
> > > were world readable and writable, so they chmoded 600 their files.
> > > - Book of Installation chapt 3 sec 7 
> ------end of quote------ 
> 
> 
> cynic@mail.cz 
> -------------
> And the eyes of them both were opened and they saw that their files
> were world readable and writable, so they chmoded 600 their files.
> - Book of Installation chapt 3 sec 7 
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail win32-thread6709@lists.mysql.com 
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail win32-unsubscribe@lists.mysql.com instead.
------end of quote------ 


cynic@mail.cz
-------------
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
    - Book of Installation chapt 3 sec 7 


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail win32-thread6928@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail win32-unsubscribe@lists.mysql.com instead.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic