Câu hỏi phỏng vấn PHP
Câu hỏi

What is the difference between MySQL, MySQLi and PDO?

Câu trả lời

Here is a concise answer to the PHP interview question "What is the difference between MySQL, MySQLi and PDO?":

MySQL vs MySQLi vs PDO

The main differences between the MySQL, MySQLi and PDO extensions in PHP are:

MySQL

  • Oldest MySQL extension, deprecated since PHP 5.5 and removed in PHP 7
  • Procedural API, not object-oriented
  • Does not support prepared statements or multiple statements
  • Vulnerable to SQL injection if not properly escaped

MySQLi

  • Improved MySQL extension with object-oriented and procedural APIs
  • Supports prepared statements, multiple statements, transactions
  • Provides more advanced features like stored procedures
  • Still MySQL-specific, not portable...
middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What are some of the big changes PHP has gone through in the past few years?

junior

What is stdClass in PHP?

junior

What are PSRs? Choose 1 and briefly describe it

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào