Hi i have offers table that contain a field as the user_id and member table with the field "membertype" ( 1 , 2 or 3 ) I want to list the offers ordered by user type (gold type's offers are shown first) solutions: 1. adding the membertype field to offer table when posting an offer etc. do you think this is the best (easiest and fastest) way? thanks for your notes
Iam not very sure that i understand what you mean Anyway, I think you should connect the two tables together using the member_id (Are they the same) It should be something like $q = "Query... LEFT JOIN profile u ON u.user_id = t.member_id ORDER BY... "; Code (markup): I think you know what i mean Hopefully
thanks. I used join and it worked. 1 other thing is how we can do ordering based on 2 fields. that means for example all data from membertype=1 is shown then membertype=2 etc but each group is ordered by their id (or submission date DESC)? how would the order clause be then? thanks for your help