elle
Member
Hi there,
I have a repeated group in my form. In there are four elements, whom doing a db query to get their values per ajax. I think, these four querys make the loading of the site a bit lame. The eval php function looks like this:
In all these four elements are nearly the same query, with the differences, that they ask for other fields in the database. The other fields are "dirProz", "parEUR" and "parProz". What I thought is, to make ONE query with ALL fields in there in ONE element like this:
...and let return the other fields in the other elements just with a simple
How can I do this?
Thanks for your interrest an your help.
Kind regards
--Elle--
I have a repeated group in my form. In there are four elements, whom doing a db query to get their values per ajax. I think, these four querys make the loading of the site a bit lame. The eval php function looks like this:
PHP:
$geraet = {0_gpa_abrechnung_19_repeat___2_geraet_vk_raw};
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('dirEUR')->from('gpa_proviliste')->where('id =' . $geraet);
$db->setQuery($query);
return $db->loadResult();
PHP:
$geraet = {0_gpa_abrechnung_19_repeat___2_geraet_vk_raw};
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('dirEUR,dirProz,parEUR,parProz')->from('gpa_proviliste')->where('id =' . $geraet);
$db->setQuery($query);
$result = $db->loadResult();
return $result[0];
PHP:
return $result[1];
PHP:
return $result[2];
PHP:
return $result[3];
How can I do this?
Thanks for your interrest an your help.
Kind regards
--Elle--