Note that there's an object-oriented MySQL abstraction built right into PHP, called PDO. Here's just one of many articles that describes the advantages of PDO: http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/