Multiple Labels on editor action
Multiple Labels on editor action
mRender
Posts: 151Questions: 26Answers: 13
So I have this code, which works: ->selectDistinct( 'sites', 'id as value, name as label' )
I want something like this: ->selectDistinct( 'sites', 'id as value, name, lastname as label' )
But everything I try gives me invalid JSON responses back.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Oh I saw the one-to-many join, which is probably what I need here.
Are you looking to concatenate the first name and last name together? You could use the
sql
method and execute a query directly which uses a string concat function for your database type. Or you could just loop over the result in PHP and combine the fields together into the required array.Allan