Jump to content

odd_concept

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

odd_concept's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks akitchin, That worked great, it may not be the best solutions but it works. At least for now or until I figure out something better. Thanks
  2. akitchin, I have tried what you said, but I think there is still a problem, because there is an AND in the WHERE statement (an.question_id=1 AND an.answer='YES') AND That makes the query return no results... You are basically checking each row twice... (Please correct me if I am wrong)
  3. I have a question but I don't know how to ask it simply so I must show you These are the table "application" table applicant_idname 1Mike 2Joe 3Frank "answers" Table applicant_idquestion_idanswer 11Yes 12No 13Yes 25No 21Yes I need to select a person that has answered YES to question_id 1 and No to question_id 2 So I tried something like this: Select * from applications Left JOIN answers on applications.applicant_id = answers.applicant_id WHERE applicant_id = 1 applicant_idnamequestion_idanswer 1Mike1Yes 1Mike2No 1Mike3Yes 1Mike5No That is as far as I can get... I would like to do this without calling multiple queries to the database with PHP Any help would be greatly appreciated... Thanks in advance
×
×
  • 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.