Hi,
I am trying to get a calculations field to work. It is just supposed to summarize a column. The code should look like this:
What it does look like is:
The extra "\" are bugging me - I can delete them, but as soon as I save the element, they come back...
Any tips or tricks?
Thanks!
Luis
I am trying to get a calculations field to work. It is just supposed to summarize a column. The code should look like this:
Code:
$my_db = FabrikWorker::getDbo();
$my_query = $my_db->getQuery(true);
$my_query->select('SUM(ve_pellets) AS my_total')->from('lose_pellets');
$my_db->setQuery($my_query);
return $my_db->loadResult();
What it does look like is:
Code:
$my_query->select(SUM('ve_pellets') AS my_total)->from('lose_pellets');
The extra "\" are bugging me - I can delete them, but as soon as I save the element, they come back...
Any tips or tricks?
Thanks!
Luis