×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
SUM of values from field
Meindert
New Member
Posts: 4
8 года 7 мес. назад #1298
от Meindert
Meindert создал тему: SUM of values from field
How to get the sum of the values from a field? Tried with adding an extra SQL field type INT and placing in default value a sql query like:
SELECT SUM(zakelijke_kilometers) FROM #__kilometerregistratie_; but that is not working (outcome is 0) - Tried also with COUNT but still not working. And this would not be a nice option - I would like to have the sum af the entered values shown as total of colomn and not as extra field. Should I hard code this in the view template with php get or something like that?
Kind regards,
Meindert
SELECT SUM(zakelijke_kilometers) FROM #__kilometerregistratie_; but that is not working (outcome is 0) - Tried also with COUNT but still not working. And this would not be a nice option - I would like to have the sum af the entered values shown as total of colomn and not as extra field. Should I hard code this in the view template with php get or something like that?
Kind regards,
Meindert
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Meindert
New Member
Posts: 4
8 года 7 мес. назад #1300
от Meindert
Meindert ответил в теме SUM of values from field
Ok, tried the SQL query with Plotalot and the query should be SELECT SUM(zakelijke_kilometers) FROM o6asj_kilometerregistratie_; but how to implement this in CC?
Kind regards,
Meindert
Kind regards,
Meindert
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Andres Maeso
Platinum Member
Posts: 338
8 года 7 мес. назад #1301
от Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Andres Maeso ответил в теме SUM of values from field
Hi there
You will need to build the component and edit the code. All files created with component creator are free to edit. to their users.
If you don't get a response from other user and you need further help on getting this to work, you might want to consider to become premium and get pro support: www.component-creator.com/en/upgrade
Regards,
Andrés.
You will need to build the component and edit the code. All files created with component creator are free to edit. to their users.
If you don't get a response from other user and you need further help on getting this to work, you might want to consider to become premium and get pro support: www.component-creator.com/en/upgrade
Regards,
Andrés.
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Meindert
New Member
Posts: 4
8 года 7 мес. назад #1302
от Meindert
Meindert ответил в теме SUM of values from field
Ok thanks for the reply. I understood I could built this myself manually so the answer is basically that this is not possible from within the component creator? I used an extra php script to do the summation at the moment and that is ok. I am just missing some features within this component creator like calculation of outcome of fields which should be possible as you have custom SQL fields. Shouldn't it be possible just to place a SQL query to do the summation? It is not interesting to go Pro if these basic functions are lacking.
Thanks, kind regards,
Meindert
Thanks, kind regards,
Meindert
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Andres Maeso
Platinum Member
Posts: 338
8 года 7 мес. назад #1303
от Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Andres Maeso ответил в теме SUM of values from field
Hi
You may be able to use the "SQL field." instead of the "SQL int field". If the query is correctly built, it should work.
Hope it works
Regards.
Andrés
You may be able to use the "SQL field." instead of the "SQL int field". If the query is correctly built, it should work.
Hope it works
Regards.
Andrés
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Время создания страницы: 0.058 секунд