Hello all, I am a beginner to php and mysql and have a question about running queries to gather information for a page I am building.
I am building a beer website where the member can see infromation about beers, breweries and rate the beer. When the user finds a beer they would like information about I would like to display on one page: Brewery Information - Name, address, etc. Beer specifics like type, alcohol percent, etc. Tasting information. I have the brewery information in one table, the beer information in another, and the how members have rated the beer in another. I have run a query to join the beer and brewery table according to the beer selected to tale care of the data for the first two items. SELECT * FROM `beerstable` LEFT JOIN (`brewerytable`) ON (beerstable.`BreweryID` = brewerytable.`BreweryID`) LEFT JOIN (`beerstyles`) ON (beerstable.`BeerStyleID` = beerstyles.`BeerStyleID`) WHERE `BeerID`='$beer_id' I have another table that is used to capture when memners rate the beer. There will be numerous records for the same been. I would like to pull data to display the following on the same page as above: Number of people that have reviewed the beer. Average score for each category. Do I have to create another query to pull this information or is there some kind of join I can do to accomplish this? If you are interested in seeing the site to get a better understanding I can send you the link and a username and password. Thank You, Stephen
