Concatenation of data in a select field

More
12 years 4 months ago #26519 by cathy75
Hi all,

I try to display 2 or 3 values ​​from a table in a select field.
I have a table with an Author Id, name, surname, birth, death.

I created a select field FLEXIcontent where I put this query: SELECT `id` AS value, `name` AS text FROM AS fi author order by author.
It returns me the correct name but I can not find how to display the name and first name the rest.
Thank you for your help.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #26521 by yopyop001
Hi,

May be you can use the CONCAT_WS Mysql function.
Eg :
Code:
SELECT `id` AS value, CONCAT_WS(' ',`name`,`firstname`) as text...

dev.mysql.com/doc/refman/5.0/fr/ ... tions.html

Regards

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #26522 by cathy75
Thank you very much, it works !

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.332 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline