Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    335
    Thanks
    63
    Thanked 11 Times in 11 Posts

    Smile table relationship question

    Hi, have two tables...

    - 'advert'
    - 'member'

    I want members to be able to save as many adverts as they wish.

    The three methods I can think of are....

    1. A column in 'member' called 'savedAdvert' with a comma separated string of advert id's which increases as more are added.. like '123,143,15,235'

    2. A column in 'advert' called 'memberSaved' with a comma separated string of member id's which increases as more are added.. like '123,143,15,235'

    3. Make another table called 'SavedAds' with two columns of 'memberId', 'advertId' and each time a new advert is saved it adds a completely new row accordingly.

    Which is the best method?

    Thank you!
    Last edited by paddyfields; 11-23-2013 at 05:13 PM.

  • #2
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    335
    Thanks
    63
    Thanked 11 Times in 11 Posts
    Forget that, I'm being stupid. It's obviously option 3.


  •  

    Posting Permissions

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