Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #12481

Re: Loop through array, change headings

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.php
Subject Re: Loop through array, change headings
Date 2014-01-01 03:26 +0000
Organization A noiseless patient Spider
Message-ID <la01tj$1vp$5@dont-email.me> (permalink)
References (1 earlier) <1muwjkgu5s0oj$.1f9jdj8mm94rc$.dlg@40tude.net> <l9viag$1vp$3@dont-email.me> <pu961g31cbxe$.1q7y2fudnvkb7$.dlg@40tude.net> <l9vs95$caf$1@dont-email.me> <1ikrupvz7e89l$.t5im5etkpl39.dlg@40tude.net>

Show all headers | View raw


On Tue, 31 Dec 2013 21:08:20 -0500, richard wrote:

> Suppose I had a table that had 12 columns and 365 rows.
> Which would represent a calendar.

That's not how you'd represent a calendar in a database. You'd represent 
a calendar as:

start time, end time (or duration), event id

In the events table, you'd have more info about the event keyed by the 
event id, which might in turn link to other tables like contacts (for 
people attending the event) by way of link tables (contact id, event id) 
and locations (keyed by location id) for where the events are held.

The whole idea of relational databases is that the key information about 
each contact, event or location is only held in one table in one place, 
so eg if a contact happens to be an event attendee but also a location 
manager, the same contact id is used in the attendee link table and in 
the location table. Then if the contact changes their phone number, 
instead of having to change that phone number in the attendee list for 
every event the contact is attending and in the location table as the 
location manager, you only need to change it in the contact table, one 
change.

Not sure why I'm bothering to explain this. You seem to be genetically 
incapable of absorbing and comprehending database theory.

There's all these people designing working databases all over the planet 
using standard database theory, not to mention all the professors and 
undergrads and PhDs etc that study, develop and teach those theories, and 
then there's the richard methodology which seems to completely disagree 
with what everyone else is doing and teaching and researching.

And richard continues to insist that he is right and the rest of the 
world is wrong.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Loop through array, change headings Adrienne Boswell <arbpen@yahoo.com> - 2013-12-31 21:08 +0000
  Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-31 21:22 +0000
    Re: Loop through array, change headings Adrienne Boswell <arbpen@yahoo.com> - 2013-12-31 23:40 +0000
  Re: Loop through array, change headings richard <noreply@example.com> - 2013-12-31 17:06 -0500
    Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-31 23:00 +0000
      Re: Loop through array, change headings richard <noreply@example.com> - 2013-12-31 19:19 -0500
        Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-01 00:39 +0000
        Re: Loop through array, change headings "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2014-01-01 00:56 +0000
        Re: Loop through array, change headings Jerry Stuckle <jstucklex@attglobal.net> - 2013-12-31 20:50 -0500
          Re: Loop through array, change headings richard <noreply@example.com> - 2013-12-31 21:08 -0500
            Re: Loop through array, change headings Jerry Stuckle <jstucklex@attglobal.net> - 2013-12-31 21:43 -0500
            Re: Loop through array, change headings "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2014-01-01 03:24 +0000
            Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-01 03:26 +0000
        Re: Loop through array, change headings Arno Welzel <usenet@arnowelzel.de> - 2014-01-01 18:01 +0100
        Re: Loop through array, change headings Norman Peelman <npeelman@cfl.rr.com> - 2014-01-02 06:23 -0500
          Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-02 13:09 +0000
            Re: Loop through array, change headings "Peter H. Coffin" <hellsop@ninehells.com> - 2014-01-02 09:20 -0600
              Re: Loop through array, change headings "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2014-01-02 15:39 +0000
                Re: Loop through array, change headings Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-02 10:52 -0500
                Re: Loop through array, change headings "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2014-01-02 16:43 +0000
                Re: Loop through array, change headings "Peter H. Coffin" <hellsop@ninehells.com> - 2014-01-05 18:23 -0600
                Re: Loop through array, change headings "Peter H. Coffin" <hellsop@ninehells.com> - 2014-01-05 18:37 -0600
              Re: Loop through array, change headings Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-02 18:04 +0000
    Re: Loop through array, change headings Arno Welzel <usenet@arnowelzel.de> - 2014-01-01 17:56 +0100

csiph-web