--- In [email protected], "Wayne Halsdorf" <[EMAIL PROTECTED]> 
wrote:
> First you will need to add IDs to the wines and members tables
> MemberID and WineID if not already there.
> 
> Second create a table we'll call shopping_list.
> shopping_list will have 2 fields MemberID and WineID.
> 
> You can then search for what wines for a member using this SQl
> SELECT Members.FirstName, Members.LastName, Wines.Wine
> FROM (Members INNER JOIN shopping_list ON Members.membrID = 
> shopping_list.MemberID) INNER JOIN Wines ON shopping_list.WineID = 
> Wines.WineID
> WHERE (((Members.FirstName)="first") AND ((Members.LastName)
> ="last"));
> 
> You can also see who want a particular wine using this SQL
> SELECT Members.FirstName, Members.LastName, Wines.Wine
> FROM (Members INNER JOIN shopping_list ON Members.membrID = 
> shopping_list.MemberID) INNER JOIN Wines ON shopping_list.WineID = 
> Wines.WineID
> WHERE (((Wines.Wine)="red"));
>

Thanks Wayne. I think I now have enough info to take me to the next 
stage - thanks again.

Richard






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to