Hi SO,
I am in the process of designing a web app (really it's a hobby, I'm trying to teach myself design, and what better way is there than doing it :). Anyways, I was thinking about how I would deal with my database. I am comfortable with PDO and I was thinking of leveraging PDO in my abstraction class. I am thinking of making a singleton, so that there's only one DB connection. This singleton would create a PDO connection.
After that, I fail to see why I would need to do too much else. I can then just use the DB handler to call PDO functions. I may want some helper functions, but when it gets down to it, I would just use PDO for the actual SQL queries.
Is there something wrong with this approach? It seems overly simple compared to the abstraction classes I've used.
(Forgive me if this has been asked, I couldn't find it when searching)
Thanks SO!