How to concatenate two fields from the #__index_users table to show in the dropdown

mauropiro 11 Oct, 2018
Dear Sirs,

How do I concatenate two fields from the #__index_users table to show in the dropdown?

I currently have in the 'fields to retrieve' field Data16.id Data16.username, and in the dropdown it appears
Data16.username
My 'users' table:
Forums image 1
My 'fields to retrieve' field
Forums image 2
My returned sql
Forums image 3
My front end dropdown
Forums image 4
The desired front end drop down
Forums image 5
Thank you in advance

Mauro
healyhatman 12 Oct, 2018
In fields to retrieve:
CONCAT(model.field , " - " , model.field2):model.alias
or
CONCAT(field , " - " , field2):alias
Pay attention to the spaces between the commas.
mauropiro 12 Oct, 2018
Dear Healyhatman

It worked perfectly, you're awesome,

Thank you.

Mauro
This topic is locked and no more replies can be posted.