Must be an easier way..

Results 1 to 2 of 2

Thread: Must be an easier way..

  1. #1
    Join Date
    Dec 1969

    Default Must be an easier way..

    Hi all-<BR><BR>I am hoping to find a good way to accomplish the following for my dating website:<BR><BR>I have three tables:<BR><BR>1) Member_info (pk_memID, first_name, etc)<BR>2) Interest_Categories (pk_catID, cat_name)<BR>3) Interests (pk_interestID,interest_name,fk_catID)<BR>4) Member_intrests (pk_memintID,fk_interestID,fk_memID)<BR><BR>I want to a member to be able to pull up a list of the interests, listed by category, with the ones they previously chose checked. Here is where I am so far (conceptually)<BR><BR> (1)Loop through Categories <BR> (2) Loop through interests within each category<BR> (3) create checkbox for each interest<BR><BR>I need to add a step that goes through the mem_info table and pulls up a list of the interests for the member in question and compares the interest in step (2)to the list of interests retrieved, and if it is there, put a checkmark.<BR><BR>Any adivice on the best way to handle this would be appreciated, as so far all I can think of is to pull all of the interests for that member out of the mem_info table and put them in an array and loop through all the items in the array for each and every interest checkbox (and I can&#039;t seem to get THAT to work either, but that is a different story)<BR><BR>Thanks<BR><BR>Ken<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default weeeel

    get all the member interests in a delimited string...then while building the checkboxes, see if these interests are in the string if they are, check the box<BR><BR><BR><BR>

Posting Permissions

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