Jump to content

bman

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, In my db I have three tables. One holds data for all the people currently in the system (call it "persons"), another holds all possible interests ("interests"), and the third lists the actual interests people in the system have ("person_interests"). Each row in person_interests contains person_id and interest_id. So here's my issue. One of the possible interests is "All." Rather than give this its own entry, I want to grab everything from interests and insert it into person_interests along with the person_id of whoever selects this choice. For example: persons: --------- id | name --------- 42 Bob --------- interests: --------- id | name --------- 1 Hiking 2 Boating 3 Biking --------- If Bob selects "All", then person_interests will have ---------------------- person_id | interest_id ---------------------- 42 1 42 2 42 3 Is there a way to do this with one query? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.