Hi,
I did a search on Chrono to see if I could find any information about this, but wasn't able to find anything.
I am running a query to get some data which I then use in my form. Getting the data w/o issue but now it seems I may be leaving connections open.
I saw in the Joomla documentation that
might work but not sure where I would put that. At the end of the form or after I've pulled (but not used) the data I need.
Any best practices/suggestions?
I did a search on Chrono to see if I could find any information about this, but wasn't able to find anything.
I am running a query to get some data which I then use in my form. Getting the data w/o issue but now it seems I may be leaving connections open.
I saw in the Joomla documentation that
$mainframe->close();
might work but not sure where I would put that. At the end of the form or after I've pulled (but not used) the data I need.
Any best practices/suggestions?
Hi sparkii,
I've never seen this reported as a Joomla! or ChronoForms issue and I don't have any instant answer I'm afraid. Are you using the Joomla! DB code for your queries?
Bob
I've never seen this reported as a Joomla! or ChronoForms issue and I don't have any instant answer I'm afraid. Are you using the Joomla! DB code for your queries?
Bob
Yes, my retrieval code is
<?php
if (!$mainframe->isSite() ) {return;}
$db =& JFactory::getDBO();
//get checked food items
$query = "SELECT `food` FROM `jos_chronoforms_yourTable`
WHERE `food` IS NOT NULL ;";
$db->setQuery($query);
$database->query();
$f_rows = $db->getNumRows();
// print_r($f_rows);
// echo "<br />";
// get value of the checked item
// for ( $i = 0; $i <= $f_rows; $i++ ) {
$blur = $db->loadResultArray();
// print_r($blur[$i]);}
// echo"<br /><br />";
//get checked non-food items
$query2 = "SELECT `nonfood` FROM `jos_chronoforms_yourTable`
WHERE `nonfood` IS NOT NULL ;";
$db->setQuery($query2);
$database->query();
$nf_rows = $db->getNumRows();
//get value of checked item
// for ( $i = 0; $i <= $nf_rows; $i++ ) {
$nfblur = $db->loadResultArray();
// print_r($nfblur[$i]);}
?>
This topic is locked and no more replies can be posted.