I have noticed that a lot of people are using or migrating to pdo, I have never used that before and I was really reluctant to change to that, I still have not changed anyway, but I would like to know from people who use the pdo everyday why I should change to that, I mean what advantages does it have over mysql_* or mysqli_*, I have googled a lot about that but I have not found a satisfactory answer yet. Thanks
It's not about supporting multiple databases with one app (although you can, with care). It's not about making it easy to change databases in the future (although it helps). It's about having one consistent, sensible interface to use regardless of database. Not only does that benefit programmers (by making their skills more broadly applicable) and projects (by making it easier for programmers to jump in), it also makes it a lot easier to create libraries that sit one layer above the data access layer. Perl has had the DBI for 20 years and it's been a decidedly good thing. PDO is a very similar concept (in fact it steals at least half of DBI's interface).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With