hi
im currently working on something using normal straightforward procedural php and mysql.
i have been thinking about using OO but i am struggling to see how OO will work with mysql in terms of how things are represented.
at the moment i just work with data from the database which is fine. what i think OO requires me to do is to read the data from the databse put it into an object and then use that object when doing the data manipulation etc. im not sure if im right.
for those that dont get what i am saying let me give an example ....
say we have a table called account which contains account details for a customer. in a procedural world we might just read and manipulate the data as required without too much fuss. in OO terms i think i need to create an instance of the class Account then feed the relevent data from the database into this instance.
what i think this would mean is alot of creating of objects when working with data and destroying of objects once the data from the instance has been update into the database.
i need someone to really help me clarify this understanding because at the moment it looks alot of hard work to me. dont get me wrong i know there are obvious advantages to OO like inheritance but the work to get data back and forth from object to database seems much.
anyway let me know what you people think. thanks.