CONCAT

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

Hi Tim,

'fullname' is what the data returned by CONCAT will be called by MySQL, it's treated the same as a column name.

You can change the order of the list by using the MySQL ORDER BY command. For example you could order your results by the fullname field by doing the following:

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

You can use any field name from your table in the ORDER BY command. You can read more about how to use order by here:

http://www.w3schools.com/php/php_mysql_order_by.asp

Cheers!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Toledoh - March 19, 2014

great!  thanks!

Cheers,

Tim (toledoh.com.au)