Zend Db Statement - reset loop -
i'm using zend framework 1.12.2 , build query:
$sitessql = 'select * app_sites'; $stmtsites = $db->query($sitessql); and want loop throw rows twice.
while ($row = $stmtsites->fetch()) { [...] } dozens of lines below
while ($row = $stmtsites->fetch()) { [...] } but unfortunately second loop doesnt loop beginning. above second while must reset statement - how? mysqli_data_seek()
can not use fetchall() (which returns array) instead?
$sites = $db->fetchall($sitessql); then can loop through results foreach twice:
foreach ($sites ...) { }
Comments
Post a Comment