-1

I would like to know more from the security perspective. What are the advantages of sqli over sql?

Anonymous Platypus
  • 1,242
  • 4
  • 18
  • 47

1 Answers1

1

I assume you are talking about the PHP MySQL extensions mysql and mysqli.

Besides the fact that the mysql extension is deprecated since PHP 5.5.x and should not be used in new projects anymore, the mysqli docs actually list the most important improvements:

The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:

  • Object-oriented interface

  • Support for Prepared Statements

  • Support for Multiple Statements

  • Support for Transactions

  • Enhanced debugging capabilities

  • Embedded server support

From a security perspective, Support for Prepared Statements would probably your strongest argument for the new extension. Prepared Statements are your best defense against SQL injections.

Community
  • 1
  • 1
TimoStaudinger
  • 41,396
  • 16
  • 88
  • 94