I have another problem and hope to get help from this community of great programmers.
I am trying to sort my products table from the values in my products_categories tables.
products table has:
products_subcategories table has:
This setup allows me to add a product into multiple sub-categories. How could I sort the products_table based on values in my orderid from the products_subcategories table.
I have this but its not working at this point.
SELECT * FROM products LEFT JOIN products_subcategories ON products.psku = products_subcategories.psku WHERE products.psku = '6025' OR products.psku = '6022' OR products.psku = '6018' OR products.psku = '6017' GROUP BY products_subcategories.psku ORDER BY products_subcategories.dsporder ASC
The products show, but are not being sorted by orderid. The orderid is contain values from 1 - 4, where
psku #6025 has orderid 1
psku #6022 has orderid 2
psku #6018 has orderid 3
psku #6017 has orderid 4
On my page output, psku #6018 is first and #6025 is last, etc.
Any help would be appreciated.