Tuesday, 19 May 2015

mysql_ extension Deprecated in PHP 5.5.x- Use mysqli or PDO instead

A very popular and very easy mysql extensions now are deprecated in PHP 5.5x.

The entire ext/mysql PHP extension, which provides all functions named with the prefix mysql_, is officially deprecated as of PHP v5.5.0 and will be removed in the future.

It was originally introduced in PHP v2.0 for MySQL v3.23, and no new features have been added since 2006. Coupled with the lack of new features are difficulties in maintaining such old code amidst complex security vulnerabilities.

The manual has contained warnings against its use in new code since June 2011.

There is a way to overcome this problem is to use PDO or MYSQLi.. If you have knowledge of  OOP(object oriented programing), you may use PDO statements to overcome the problem of mysql_ deprecation.

See also
Database connection using PDO in PHP


No comments:

Post a Comment