procajlok
Member
Hello!
Is this correct? I want return number of record from repeat group where parent_id is from actual editing record and (in this field) where dropdown field (rozmiar_koszulki) is "1".
There i use calculation field. Is on next page (next group) right after the repeat group. If you will be so good to log into the system and check it, this field is "pp_ilosc_KD_XS" in DEV SDM page.
Any chance to calculate this field 'on the fly'?
Thanks!
Is this correct? I want return number of record from repeat group where parent_id is from actual editing record and (in this field) where dropdown field (rozmiar_koszulki) is "1".
There i use calculation field. Is on next page (next group) right after the repeat group. If you will be so good to log into the system and check it, this field is "pp_ilosc_KD_XS" in DEV SDM page.
Any chance to calculate this field 'on the fly'?
PHP:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('COUNT(*)')->from('zgloszenia_14_repeat')->where('parent_id ='.'{zgloszenia___id}')->AND('rozmiar_koszulki = '.'1');
$db->setQuery($query);
$count = $db->loadResult();
return $count;
Thanks!
Attachments
Last edited: