+ 12
mysqli vs PDO
What's the main difference between these two other than methods and syntax.
4 ответов
+ 8
Ultimately, PDO wins this battle with ease. With support for twelve different database drivers (eighteen different databases!) and named parameters, we can ignore the small performance loss, and get used to its API. From a security standpoint, both of them are safe as long as the developer uses them the way they are supposed to be used (read: prepared statements).
for more:
https://code.tutsplus.com/tutorials/pdo-vs-mysqli-which-should-you-use--net-24059
+ 5
PDO is much better than MYSQLI, because, in theory, you can use the database of your choice, i.e. postgress, sql server, etc.
+ 4
And I say 'in theory', because always are pros and cons of using a specific driver for a Database
+ 1
>> Prepared statements or PDO are better. They are more secure way to pass queries to DB. you will understand it once you learn how Prepared statements/PDO works.