webERP Forum
ForEach() vs. While() Issue in Reports? - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: ForEach() vs. While() Issue in Reports? (/showthread.php?tid=8290)



ForEach() vs. While() Issue in Reports? - VortecCPI - 12-11-2018

SalesReport.php
PurchasesReport.php

This does not work in my case:

PHP Code:
foreach($Result as $MyRow) { 

But this does:

PHP Code:
while ($MyRow DB_fetch_array($Result)) { 

Any ideas or thoughts?


RE: ForEach() vs. While() Issue in Reports? - TimSchofield - 12-11-2018

The standard for weberp is to use while () loops for iterating through datasets.