Jump to content

MySQL vs MySQLi


benjaminmorgan

Recommended Posts

See http://uk3.php.net/manual/en/mysqli.overview.php

 

On the surface, both do about the same thing -- allow you to communicate with a database. MySQLi has some advantages though:

 

- object-oriented interface

- support for prepared statements (which prevent SQL injection)

- support for multiple statements

- support for transactions

- enhanced debugging capabilities

- embedded server support.

 

I would definitely suggest going with MySQLi or PDO over plain MySQL, since both MySQLi and PDO support prepared statements, which allow you to escape any data that you use in your queries, preventing SQL injection (http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...