Hi,
I've made a connection with the following settings:
Name: test
Tablename:test
WHERE SQL: Where team = 'team1'
HEADER: <?php $totalresult = 0; ?>
BODY: <?php $totalresult = $totalresult + $row->amount; ?>
FOOTER: <?php echo $totalresult ;?>
What i want to do is to show the result, which is generated in the connection above, in the body of another connection? The Where statement has to be variabele later on but that's the next step for me. Is this possible?
Regards,
Jaap
I've made a connection with the following settings:
Name: test
Tablename:test
WHERE SQL: Where team = 'team1'
HEADER: <?php $totalresult = 0; ?>
BODY: <?php $totalresult = $totalresult + $row->amount; ?>
FOOTER: <?php echo $totalresult ;?>
What i want to do is to show the result, which is generated in the connection above, in the body of another connection? The Where statement has to be variabele later on but that's the next step for me. Is this possible?
Regards,
Jaap
Hi Jaap,
you can define that PHP variable as a global one and then call it back in the new connection or even add it to a session, depending on your needs!
Regards
Max
you can define that PHP variable as a global one and then call it back in the new connection or even add it to a session, depending on your needs!
Regards
Max
Hi Max,
Thanks for the reply, but do you perhaps have an example for me. It's all new for me.
Regards,
Jaap
Thanks for the reply, but do you perhaps have an example for me. It's all new for me.
Regards,
Jaap
Hi Jaap,
in the first connection and before any thing add this code in the head :
in the 2nd connection do the same then use the same variable and it will hold the same data!
Regards
Max
in the first connection and before any thing add this code in the head :
global $totalresult ;
in the 2nd connection do the same then use the same variable and it will hold the same data!
Regards
Max
$session =& JFactory::getSession();
$session->get('chrono__submissions_limit', 'default value', md5('chrono')); // retrieve session values
$session->set("chrono__submissions_limit", 'value', md5('chrono'));//set values
check the Joompla API site for more hints about the functions!
Regards
Max
This topic is locked and no more replies can be posted.