paulc8481 Posted August 24, 2016 Share Posted August 24, 2016 I have taken php in school and worked with MySQL procedural methods but now I have read a number of articles regarding PDO and its use across various platforms. Is PDO that much better than procedural or is it overblown. If some was to use the older procedural method would it be bad. I would like some input regarding this before I begin so I make the right choice. Thank you Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted August 24, 2016 Share Posted August 24, 2016 If you're talking about the mysql_* functions, they're hopelessly outdated and have been removed from PHP 7 (they still exist as deprecated functions in PHP 5). No current code should use them. One objective problem is that the old extension doesn't support prepared statements, making it impossible to securely pass values to queries. The two modern alternatives are mysqli and PDO. mysqli is very similar to the old MySQL extension and even has a procedural interface. However, it's rather cumbersome and naturally limited to the MySQL database system. PDO is purely object-oriented, but it's well-designed and supports all current mainstream database systems, not just MySQL. I generally recommend PDO. There are several good tutorials out there. Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted August 24, 2016 Share Posted August 24, 2016 I generally recommend PDO. I second that. Once you start using, you will wonder why you didn't start earlier. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.