Concat two columns from different MySQL tables -


i trying concat list of usernames 1 column in mysql. 2 lists of usernames coming 2 different tables.

(select cast(group_concat(concat(usr.username, ' ' ,cc.username)separator ',') char(200)) messagejobrecipients mr         left join chatusers cur on mr.chatuserid = cur.id          left join users usr on cur.tableuserid=usr.user_id         left join customer_contacts cc on cur.tableuserid=cc.id         jobid = j.id) membersincluded 

the code works fine if try display concat(usr.username) or concat(cc.username) when try display both concat(usr.username, ' ' ,cc.username) returns null.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -