Page 1 of 1

Plot to kill mysql extensions

PostPosted: Fri Nov 04, 2011 10:48 pm
by beniston
PHP core developers are planning to kill the PHP original MySQL extension.

Through its a popular extension, the application would get affected when upgraded to future versions if direct commends of mysql extension is used.

Read more here:

So guys, even in Wordpress or any other open source application or in any framework avoid using mysql commands directly. Use the functions supplied by the open source itself.

Well, if not mysql_***** what are the alternative methods that are there to work with Mysql database? There are advanced extensions like PDO, mysqlnd, etc are available for the same. So nothing to worry on the alternative :D

Re: Plot to kill mysql extensions

PostPosted: Thu Jul 05, 2012 10:28 pm
by beniston
This Php class can access SQL databases using PDO.

http://www.phpclasses.org/package/7533- ... g-PDO.html

If you have not changed to PDO yet, here is a helping class to change. :D

Re: Plot to kill mysql extensions

PostPosted: Thu Jul 05, 2012 10:37 pm
by beniston
Here is a supporting article for you to change to PDO. :D

http://net.tutsplus.com/tutorials/php/p ... gle+Reader

Why Should I change from using mysql_* commands
Deprecated: Though it hasn't been officially deprecated – due to widespread use – in terms of best practice and education, it might as well be.
Escaping: The process of escaping user input is left to the developer – many of which don't understand or know how to sanitize the data.
Flexibility: The API isn't flexible; the code is made for working with MySQL database.

Bottom Line: Your code will be significantly more secure and streamlined if you adopt the PDO extension.