Updated
Hello all,
MySQL here.
Let’s say we have 3 tables.
TableA, TableB, TableC.
TableB relates with foreign keys, TableA and TableC.
I would like to:
List some data from TableA and TableC BUT, that data should be ordered by some column of TableB.
Can I have an example of the above so that I can study it and try to transform to my needs?
Thanks a lot.
MEM
mysql allows you to order by colums that not selected, so you can join your tables
select ta.somefield, tc.somefieldfrom TableA ta INNER JOIN TableC tc on tc.somefield=ta.somefieldINNER JOIN TableB tb on tb.somefield=ta.somefieldORDER by tb.somefield