When / where do we use PDO?

I want to know when and where do we use PDO besides simple mysql_connect methods?

Is this PDO faster? What are the advantages over other methods?

+3
source share
3 answers
  • Security: The most useful thing with PDOs are prepared statements. Using them to write code that can be SQL Injected is much more difficult .; -)

  • Error Handling: On the other hand, error handling is much better, since you can switch to Exceptions rather than false FATALs ERRORS, etc.

  • : mysql_ mysql. , - antoher . MySQL, , .

+8

PDO PHP . PDO - PHP, JDBC Java. , , .

+3

, mysqli , PDO (, , ..), , mysqli PDO.

0

Source: https://habr.com/ru/post/1716499/


All Articles