Issues With Lists Using foreach($Result as $MyRow)
|
04-07-2017, 01:46 AM
(This post was last modified: 04-07-2017 02:46 AM by VortecCPI.)
Post: #1
|
|||
|
|||
Issues With Lists Using foreach($Result as $MyRow)
I thought this may be helpful to others who may have encountered issues with a few pages that show empty lists in 4.13.1.
I had to replace "foreach($Result as $MyRow)" with "while ($MyRow = DB_fetch_array($Result))" in the following files: + GLAccounts.php + GLCashFlowsIndirect.php + GLCashFlowsSetup.php + WWW_Users.php For reference I am using the following: + ClearOS Community 6.8.0 + webERP 4.13.1 + MySQL 5.1.73 + PHP 5.3.3 Outstanding work, by the way! |
|||
04-07-2017, 01:59 AM
(This post was last modified: 04-07-2017 02:05 AM by dalescott.)
Post: #2
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
I'm just a user, what were the symptoms? SQL errors rendered in WebERP? What did you do that resulted in the symptoms? I grabbed a screenshot with SQL errors recently when working through the contracts process, but I haven't had a chance to revisit.
Also, and I don't mean any disrespect, but why not include a patch? Was it the project's fault for not explaining how? Waiting to see if someone asks for a patch? Just curious... And really, I am not trying to call anyone out, I'm just curious because community feedback is how a project gets better. Also, if anyone PMs me I'll post an anonymized group summary. Forgot PM is disabled. dale@dalescott.net http://www.dalescott.net |
|||
04-07-2017, 02:11 AM
(This post was last modified: 04-07-2017 03:22 AM by VortecCPI.)
Post: #3
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow) | |||
04-07-2017, 04:02 AM
Post: #4
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
The entry in WWW_Users.php has already been changed in SVN, after the release of 4.13.1.
|
|||
04-07-2017, 04:39 AM
Post: #5
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow) | |||
04-07-2017, 07:26 AM
Post: #6
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
In the two cash flows scripts there are also places where you need reset the result set to the first record using the DB_data_seek() function, as the same result set gets reused, but the while loop just takes off where the previous one left off.
Tim |
|||
04-07-2017, 07:53 AM
Post: #7
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
(04-07-2017 07:26 AM)falkoner Wrote: In the two cash flows scripts there are also places where you need reset the result set to the first record using the DB_data_seek() function, as the same result set gets reused, but the while loop just takes off where the previous one left off. Thank you Tim! |
|||
04-07-2017, 11:07 PM
(This post was last modified: 04-07-2017 11:29 PM by falkoner.)
Post: #8
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
I would suggest you create a patch for this change and submit it to submissions@weberp.org
I should say this patch should be against the latest SVN code from Sourceforge. Tim |
|||
04-08-2017, 02:36 AM
Post: #9
|
|||
|
|||
RE: Issues With Lists Using foreach($Result as $MyRow)
(04-07-2017 11:07 PM)falkoner Wrote: I would suggest you create a patch for this change and submit it to submissions@weberp.org While I have no issue with work related to doing this I think it is best left to the experts. Any changes should be adequately tested and verified for proper operation and I am not qualified for such work. While I am familiar with PHP and have been developing applications since 1983 I am NOT intimately familiar with webERP. I would rather a qualified contributor/developer manage any changes to a released version of webERP. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)