# "switch to mysqli or stay with mysql?" Code Answer

4

quoting the manual for ext/mysqli:

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

note: if you are using mysql versions 4.1.3 or later it is strongly recommended that you use this extension.

if you need just one of those features and can afford the refactoring, then yes, go for it. if you dont need any of those features then dont do it. there is no reason to refactor if there is no benefits.

on a sidenote, the rumors are true. ext/mysql will likely be deprecated (although no one can say when at the time of this writing. it certainly wont be deprecated with 5.4. and it will likely be available as a pecl extension forever) in any case, you shouldnt be starting any new projects with ext/mysql anymore when you have a superior extension to start with.