history_tickets と users の 2 つのテーブルがあります。
表 1 : history_ticket
history_id | id_klien | id_staf | message
11 | 77 | NULL | text
12 | NULL | 1 | text
13 | 77 | NULL | text
表 2: ユーザー
user_id | name | group
1 | john | staff
77 | dion | member
私はこのような結果が欲しい:
history_id | message | user_id | name | group
11 | text | 77 | dion | member
12 | text | 1 | john | staf
13 | text | 77 | dion | member