transforming fields CC V4 RC 3.2

bighen 15 Sep, 2012

I have seen the message in fields list:
Functions should have aliases, e.g: COUNT(*) AS mycount.

So I thought some magic is possible like concatenating several fields into one like:
CONCAT_WS(' ', adddress1, address2) AS address

What else? Counting values on the fly like: quantity*price AS value

Is there any way to do some operations on the database fields before displaying in the table column?
Obviously in Auto Listing...
I know I am in control with PHP in Custom Listing...

GreyHead 15 Sep, 2012
Hi Henryk,

I've only just installed the upgrade after reading your post. I don't know exactly what is permitted. My best guess is that you can use any MySQL expression in that box including Calculations provided that you keep Max's notes in mind.

Max_admin 18 Sep, 2012

Honestly I tried this:

COUNT(MODEL.field_name) AS count

LENGTH(MODEL.field_name) AS length

And they worked fine that time, you can also check the loaded data structure under the debug section.

Please note that using asterisks may not work, or any complicated fields names inside the function name.

ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.