I see ...
If you look at that SELECT statement, you will see the table references:
Each table is referenced with:Code:FROM " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " povpo, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
povpo
po
pov
which saves having to write out the whole name of the table ...
On the ORDER BY:
It defines what the sort order for the records selected should be so this is sorted by the products_options table field products_options_id then it looks at the products_options table products_options_name it then sorts the products_options_values table products_options_values_sort_order and then the products_options_values table products_options_values_name ...Code:ORDER BY po.products_options_id, po.products_options_name, pov.products_options_values_sort_order, pov.products_options_values_name


Reply With Quote
