CONCAT

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 19, 2014   (RSS)

By Toledoh - March 19, 2014

Hi Guys.

I've got an editor with a list field using "get options from mySQL" and I have played around with things to get the following:

SELECT num, CONCAT(last_name, ' ', first_name, ' :', num) fullname
FROM `<?php echo $TABLE_PREFIX ?>individuals`

I have this working, and it makes a pick list with the options being a collection of "Last Name First Name :Num" which is exactly what I want, however I don't understand;

1. What does the "fullname" do?

2. How do I get the list to be in a certain order?  I have the individual table sorted by last_name, but the list is showing ordered by num.

Cheers,

Tim (toledoh.com.au)

By Toledoh - March 19, 2014

great!  thanks!

Cheers,

Tim (toledoh.com.au)