Welcome Guest, Not a member yet? Register   Sign In
RESOLVED: Correct way to manipulate data?
#4

[eluser]xwero[/eluser]
If your server runs php5 you don't have to convert the object to an array. You can iterate it like an array, manipulating the data in the iteration, and use the object in the view file.

You can do the data manipulations in the controller but i found out it blows up controllers code pretty fast.

Bottom line there is no bad way. You can keep it in the view and make functions to manipulate the data with one function to not overload the view with code.
Do the manipulation in the controller. You could build a manipulation library to prevent the controller code from blowing up.
You could do it in a model that has methods for specific views. You can do some of the manipulations in sql this way you don't have to use php functions.


Messages In This Thread
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 03:41 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 04:03 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 04:14 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 04:37 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 04:40 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 04:47 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-09-2008, 05:44 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-10-2008, 05:28 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-10-2008, 09:31 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 05-10-2008, 09:46 AM
RESOLVED: Correct way to manipulate data? - by El Forum - 12-13-2008, 11:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB