Hi all, I'm struggling with a bit of logic here. What's the score on connection to a database inside of a class (PDO). I'm guessing it's bad practice and any queries should be passed as an array to the object - is this correct?
What should I do with entering data into the DB? For example, say you have an orders class, one of the methods is to create the order, would you return an array from the method of all the data to be entered into the DB and then to enter back in the script?
Getting pretty good at OOP, just need a little extra help. Have had a play with a framework (CodeIgnitor) but found it too limiting if that makes any sense - although I did like the MVC pattern.