Results 1 to 2 of 2

Thread: Mysql set up

  1. #1
    Join Date
    May 2009
    Posts
    9

    Mysql set up

    I have a question about setting up a table in MYSQL

    Basically, one field would be a "Location". There is a minimum of 1 location, but it is possible for there to be several.

    I was thinking about making "Location" a comma separated list of LIDs, then I can just select a certain LID to be IN Location.

    It does not seem to be a fairly efficient method- is there a better way to be doing this? What are the pros and cons of this method vs others.

    Thanks, Dave

  2. #2
    Join Date
    Feb 2007
    Location
    Ireland
    Posts
    1,007
    Can the same location occur in multiple records? If the answer is yes, then the best way to do this is to setup a many to many relationship. A comma separated list could be used aswell, but that's messy. You could use a serialized numeric array instead. It doesn't really matter tbh. A many to many is the way to go though.
    “The best thing about a boolean is even if you are wrong, you are only off by a bit.”

Similar Threads

  1. Dramatically Speed Up Sites with caching on Apache
    By apachedude in forum Web Hosting and Domain Names
    Replies: 0
    Last Post: 18 Jan 2007, 01:43 AM
  2. New Free MySQL GUI
    By expert-database in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 21 Dec 2006, 05:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •