I'm attempting to write a single SQL statement that will accomplish the following...
Expand|Select|Wrap|Line Numbers
- table_a
- PK INT table_a_id
- VARCHAR ref_num
- table_b
- PK INT table_b_id
- FK INT table_a_id
- DATETIME insert_date
- VARCHAR note
Expand|Select|Wrap|Line Numbers
- a.ref_num b.note
- 0001 Note1
- Note2
- Note3
I currently am using two arrays within PHP to handle the construction of this, but I feel like it is losing efficiency if it can be done within the SQL syntax.
Any help would be appreciated.
Thanks!