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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.