MYSQL / PHP从相同列名的JOIN获取值

SELECT admin.User, a.time

FROM admin 

LEFT JOIN a ON admin.User=a.User

LEFT JOIN b ON admin.User=a.User

So I have three tables, admin then a & b. At the moment I get tables a & b by joining via a shared field called User. However tables a & b have a field called 'types' which is not in the admin table.

What I want to do is instead of select 'types' twice - once for table a and once for table b, is have the 'types' field combined so there is only one results set for that field.

try to use ifnull(a.types, b.types) as types to export the field. (MySQL)

so that it try to get a.types first, if that yields null, then yields b.types instead.