Hi all,
i'm having a problem while fetching a result set on a nested routine.
I think it's more simple to read the example:
$myFirstTable = new myFirstTable();// extetend Zend_Db_Table_Abstract
$mySecondTable = new mySecondTable();// extetend Zend_Db_Table_Abstract
the i call a function that get some rows from db (i don want to use fetchAll
due to big set of results, so i use query statment)
$result = $myFirstTable->getResult($id);
while ($row = $result->fetch()) {
//do some logic
//but if I use another query to db the while loop will stop immediatly
$mySecondTable->updateMyrecord($mycalcualtedId);
//if I not use this call o any call to db the loop finish correctly
}
So to solve this problem i' going to waste memory fetching all result on an
array and then
looping and this work.
foreqach ($myresults as $foo => $bar) {
//do somet logic
$mySecondTable->updateMyrecord($mycalcualtedId);
}
Someone can drive me on right direction?
Thank you
--
View this message in context:
http://www.nabble.com/Zend_Db_Table_Abstract-problem-fetching-db-result-on-nested-routine-tp23193450p23193450.html
Sent from the Zend Framework mailing list archive at Nabble.com.