I have two tables:
User_prefs table:
user_prefs_id int(11) PK user_id int(11) item varchar(128) PK category_id smallint(6) parent smallint(6) rank tinyint(4) dateadded datetime
Table Categories:
category_id int(11) PK name varchar(255) main_category varchar(64) parent int(6) isparent enum('No','Yes') display_rank int(9) active enum('Yes','No')
I make a selection from user_prefs
based on user_id
, but I want to sort by category name, which is in the category table - category_id
mapped between two tables
Is it possible?
source share