How to get result on PHP:
- NU61 – sun – 2011
- KE2I – ball – 2000
- B8WO – point – 2008
table_first SELECT id, order, date FROM table_first ORDER BY orders DESC
return id, date
id | orders | date
------+---------+------
KE2I | 2 | 2000
B8WO | 5 | 2008
NU61 | 1 | 2011
table_second SELECT key FROM table_second WHERE id=(id from table_first) get key to reach content from table_third
id | key
------+-----------------
KE2I | .b
B8WO | .p
NU61 | .s
table_third SELECT content FROM table_third WHERE id=(key from table_second) return content
id | content
------+-----------------
.b | ball
.p | point
.s | sun
Performance will not be a concern as long as you have indices on: