Hi All,
I am just making my first steps in PHP Scripts and I can see that there are mysql functions and mysqli functions for same purposes...
Which one should I use ? mysql or mysqli functions ? Any criteria to choose using one or the other ?
Thanks !
El Vasco
mysql Vs mysqli
Moderator: General Moderators
-
mikecampbell
- Forum Commoner
- Posts: 38
- Joined: Tue Oct 12, 2010 7:26 pm
Re: mysql Vs mysqli
mysqli is recommended.
Re: mysql Vs mysqli
if you are using php version below 5, then use mysql.mysqli is object oriented.i would suggest to use mysqli
Re: mysql Vs mysqli
mysql is the older extension and mysqli is the newer one
What is PHP's mysqli Extension?
The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.
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.
Re: mysql Vs mysqli
I use Zend_Db which is an object oriented wrapper for PHP'd PDO objects. PDO stands for portable database object, it is portable because it provides a consistent OOP interface across a multitude of databases.
Edit: it stands for "PHP Data objects" I guess... http://us.php.net/pdo
It should do everything mysqli does and more, including prepared statements.
Edit: it stands for "PHP Data objects" I guess... http://us.php.net/pdo
It should do everything mysqli does and more, including prepared statements.
Re: mysql Vs mysqli
Thank You, All for your kind and usefull responses !
BR. El Vasco.
BR. El Vasco.