Hello
System Information: MYSQL 5.5.16, PHP Version 5.3.8, Windows NT, XAMPP 1.7.7
I am trying to extend the coffee site and would like to know what I should do to alter the drop down list to display size information from the sizes table. I have changed the sizes table so that size has various weights. Here is the new sizes table:
id size
1 25 grams
2 50 grams
3 75 grams.
4 100 grams
5 1.25 grams
The main problem in my oopinion is probably the query which probably needs to be recast to reflect the size attributes in the coffee site. Here is the query in question that is a stored procedure (p.196-7 and p.202):
SELECT gc.description, gc.image, CONCAT("C", sc.id) AS sku,
CONCAT_WS(" - ", s.id, s.size) AS name,
sc.stock, sc.price
FROM specific_coffees AS sc INNER JOIN sizes AS s ON s.id=sc.size_id
INNER JOIN general_coffees AS gc ON gc.id=sc.general_coffee_id
WHERE general_coffee_id=cat
You might be interested to know that I have broken the problem down to a simple query in another program for testing purposes such that $q = "SELECT id, size FROM sizes"; this query does in fact produce the right result with the various sizes displaying in the drop down list. Perhaps I also need to alter the option code, too!
Thank you for any help in advance!