Hi,
I am struggling with the following problem and need some expert help. I hope it makes sense.
I have to mysql tables.
useritems: id userid itemid
items: id name
I have a standard query that selects all fields from the user items field..
"SELECT `id`, `userid`, `itemid` FROM `useritems` WHERE `id` = '3'"
This works just fine BUT I want to have the results ordered by their name (in the items table). The itemid in the useritems table, refers to the id in the items table.
so something like..
"SELECT `id`, `userid`, `itemid` FROM `useritems` WHERE `id` = '3' ORDER BY (name from the other table) ASC;"
Now I figure this requires a left join but just cannot get it working.
Any help is appreciated.