I have a table with ratings for every store in a directory. I want to display the average rating from each store on a business directory list page. I have the directory business listing page finished without the average rating.

I believe I have figured out how to create an average rating, but I don't know how to get the rating to output in the loop for each store.

Here is how I calculate the rating:

$result = mysql_query("SELECT AVG(rating) FROM reviews GROUP BY store_id WHERE store_id = '$storeid'");
$rating_for_page = mysql_fetch_row($result);
$rating = $rating_for_page[0];



Question: Which is better extrusion or assembly for creating blueprints?
Answer: I would create the pieces separately and then join them later. Here are some reasons why:


It allows you to preserve separation of concerns. This in itself has many benefits; for example, you could have different team members working on different parts.
It allows you to easily animate assembly instructions by simply moving the objects.
Logically, it makes more sense: the pieces are physically separate; in the real world, they are separate objects, so they should be in Blender as well.
You can join the pieces together at any time by selecting them and pressing CtrlJ or 3D View &rarr; Tool Shelf (T) &rarr; Join, and you can separate them again with Separate (P) &rarr; By Loose Parts while in edit mode.