Ordering output when comparing items from 2 tables
Posted 26 August 2006 - 08:17 AM
Wondering if anyone can point me in the right direction. I have the following command:
"SELECT * FROM products_tree, products WHERE products_tree.sectionID = '$section' AND products.productID = products_tree.productID AND products.keywords LIKE '%$search%'"
It works ok. Checks the products_tree table for the given section number, and then retrieves the relevant data from products for the given productID and the keywords match the criteria. However I'd like to order the output by products.code as it's simply outputting in the order retrieve from the database.
I've added in an ORDER BY clause but that had no effect.
What am I doing wrong?
Posted 26 August 2006 - 07:07 PM
Posted 27 August 2006 - 10:34 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users