Search the Community
Showing results for tags 'sortng'.
Hi all I have a question that relates to fetching records from a mySQL databse using php. Basically I have a table that stores product options and another table that stores the products themselves. There can be one or more product options for each product but there is always 1. The product options table has the product option ID, the product ID and the price. Thre product table has the product ID, category ID, name etc... The page has a $_GET on it with a category ID such as category.php?id=4&sortby=priceasc I need to firstly group all the product options by product ID and sort by the lowest price or highest price. Then I need to filter these by the category ID before outputting them to the browser. Hope someone can help me. Many thanks Pete