i have 4 tables in a db, to allow users rate certain recipes. they might not rate all recipes at one time. they might even go back and rate a recipe more than one time. there will also be at least 1, and up to 4 kids participating in voting for each recipe.
i would like to determine the first 100 moms to rate all X recipes using the date of submission of the vote of the final recipe as qualifier. (meaning a mom would get added to the list of 100 after she rates all recipes from the recipes table)
it seems it will either take a complex nested query, or several queries mixed in with php
below are the 4 tables.
any help would be appreciated.
recipes_db
-- recipe_id
-- recipe_name
mom_form
-- user_id
-- firstname
-- lastname
-- phonenumber
-- address
-- city
-- state
-- zipcode
-- timestamp
mom_comments
-- comment_id
-- user_id
-- recipe_id
-- favorite_recipe
-- moms_comments
-- childname1
-- childage1
-- child_comments1
-- childname2
-- childage2
-- child_comments2
-- childname3
-- childage3
-- child_comments3
-- childname4
-- childage4
-- child_comments4
-- timestamp
mom_votes
-- votes_id
-- rating
-- user_id
-- recipe_id
-- timestamp