Hi,
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...
Regards
Henryk
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...
Regards
Henryk
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.
Bob
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.
Bob
Hi,
Honestly I tried this:
and
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.
Regards,
Max
Honestly I tried this:
COUNT(MODEL.field_name) AS count
and
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.
Regards,
Max
This topic is locked and no more replies can be posted.