Welcome Guest, Not a member yet? Register   Sign In
Problems getting foreach loop to display data
#11

[eluser]douglasbrownca01[/eluser]
Yep, that gets me one result -- but as I read that -- it's just looking for the first item in the array object. I want to return a set of rows into a table. So is there a way to loop it in the view to bring back the full contents of the array?

I guess what i don't understand is why the original $fingerguard->item_code didn't work and just loop through the dataset like it did in the get_accessories function.
#12

[eluser]douglasbrownca01[/eluser]
Yep, that gets me one result -- but as I read that -- it's just looking for the first item in the array object. I want to return a set of rows into a table. So is there a way to loop it in the view to bring back the full contents of the array?

I guess what i don't understand is why the original $fingerguard->item_code didn't work and just loop through the dataset like it did in the get_accessories function.
#13

[eluser]douglasbrownca01[/eluser]
Ok, I figured it out -- or at least where my mistake was. My original approach was correct with building the queries all under the get_accessories() function in my Model. I was returning the results early -- I've got it working correctly now for multiple instances. Thanks for all your help.




Theme © iAndrew 2016 - Forum software by © MyBB