i have two tables one is called addons and holds information about different addons, there are a lot of columns but here are the main
addon_id | addon_name | addon_size
1 | loft conversion | small
2 | extension | large
And i have another one called addons_count
addon_id | addon_count
1 | 5
2 | 6
Which holds the number of addons used in the system
The problem is that i have a query already that just outputs the addons through a while loop
SELECT * FROM `addons` WHERE addon_size='small' LIMIT {$startpoint_small} , {$limit}
However i am trying to make it sort the different addons based on the addon_count, however because they are from 2 different tables how would i do this, such as through an orderby?
Thanks for ay and all help
1 Answer