Forum Moderators: coopster
However, I've recently learned that MySQLi is the newer method of working with a database, and on top of that, the benefits of OOP.
My question is this: Is it worth it to take the time to learn MySQLi and OOP, or should is it not too important? I'm building a big application right now, and just a little worried that I'll have to go through all my code and update it all.
Thanks in advance!
There are some other things I want to implement as well, such as prepared statements.
I just wish I learned about all this BEFORE I started building my application! ><
As far as database access and queries go, consider an abstraction layer for future use. It doesn't necessarily have to be object oriented, it could be as simple as a bunch of functions stored in an included file. You include (or require_once) this file whenever you need to use your database. Now you have one place to worry about setting up and maintaining all your database processing routines. It will ease your maintenance and updates. The PEAR MDB2 (or DB) class was designed partly for this reason. Another reason was for cross-database compatibility. Trouble is, it may be more than you want for your own application.