Jump to content

MySQL - PDO


dean7

Recommended Posts

Hey guys, I've heard about MySQL being replaced with PDO some time in the future, but as a simple question, I'm coding a personal website for my use only, would I still be able to use MySQL rather than changing it to PDO and learning that? 

 

Its not going to be anything big or nothing just to keep me active in my spare time.

 

Thanks for you help.

Link to comment
https://forums.phpfreaks.com/topic/289243-mysql-pdo/
Share on other sites

the mysql_ functions will be removed in a future (not yet specified) php version. at that point in time, you will not be able to upgrade the php version (or hope your web host doesn't have a habit of upgrading versions without telling you) until you redo your code to use either the mysqli or PDO database functions.

 

the point of officially depreciating the mysql_ functions now, in favor of the msyqli or PDO functions, is to give everyone a warning that they need to start switching over their code so that there won't be a mad scramble later when the actual date that the mysql_ functions are removed gets announced. all new code should use either the msyqli or PDO functions to avoid wasting time later redoing it just to get it to work again.

 

short-answer: the mysql_ functions will be available for some amount of time (likely a few years), but if you know they are obsolete and are going to be removed, why continue to use them knowing you will have to rewrite any code that uses them? just write your code now to use one of the replacements and save all the time it will take to redo code again in the future or at least abstract your database layer so that at most all you will need to do is replace the underlying database functions.

Link to comment
https://forums.phpfreaks.com/topic/289243-mysql-pdo/#findComment-1483027
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.