MySQL Forums
Forum List  »  Newbie

Re: Finding like rows based on one of two fields
Posted by: Paul Ille
Date: August 16, 2015 04:18PM

Thanks! I'll try that way too.

I was able to get a result I wanted by doing this. I'll see if your way is better.

SELECT pfg.person_id, pfg.game_id
FROM persons_favorite_games pfg
WHERE person_id IN ($personids)
GROUP by game_id
HAVING count(game_id) = $personidcount

$personids is the array with the collection of person_id values
$personidcount is the count of the values in the array

Options: ReplyQuote


Subject
Written By
Posted
Re: Finding like rows based on one of two fields
August 16, 2015 04:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.