MySQL vs MySQLi when using PHP

anand.trex picture anand.trex · Feb 14, 2009 · Viewed 226.7k times · Source

Which is better, MySQL or MySQLi? And why? Which should I use?

I mean better not just in terms of performance, but any other relevant feature.

Answer

Mark Davidson picture Mark Davidson · Feb 14, 2009

If you have a look at MySQL Improved Extension Overview, it should tell you everything you need to know about the differences between the two.

The main useful features are:

  • an Object-oriented interface
  • support for prepared statements
  • support for multiple statements
  • support for transactions
  • enhanced debugging capabilities
  • embedded server support.