in reply to Re: access array of values without a loop
in thread access array of values without a loop

I suspect you hit the central problem square on the head.   And, just for completeness:   you can also represent many-to-many relationships in an SQL database ... this requires three tables.   For example:
INVOICE <-> INVOICE_LINEITEMS <-> ITEMS.

  • Comment on Re^2: access array of values without a loop

Replies are listed 'Best First'.
Re^3: access array of values without a loop
by CountZero (Bishop) on Feb 20, 2015 at 09:46 UTC
    Yes and that is even the better solution in case (returning to my example) one has authors which have authored multiple books.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      You probably know this but I want to clarify for other readers. Many to many works, and is a more flexible idea, but only necessarily applies when a book has more than one author (and an author has more than one book of course). One author has many books v many books have many authors.