
January 4th, 2013, 05:35 PM
|
|
|
|
Whatever its merits, I can't see OOP completely replacing procedural code any time soon.
However, the 'mysql' method is, as you suggest, slowly being superseded by alternative methods of PDO and MySQLi.
These methods are more secure than the traditional method, with (mostly) negligible effects on performance.
To my understanding, characteristics of each are as follows:
MySQLi
- suitable for both OOP and procedural environments
- MySQLi is tied to MySQL
- very similar usage to the traditional mysql method
PDO
- suitable for OOP
- not wedded to any particular SQL engine
Others will of course come to a different conclusion, but I make that 2-1 (or 3-2) in MySQLi's favour.
So you don't need to rush to learn OOP - but that's no reason not to start!
|