Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2011
    Posts
    303
    Thanks
    29
    Thanked 0 Times in 0 Posts

    Mysql to Pdo conversion?

    hi

    would this be easy to do? where would i start?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    If you currently have a centralized control, then yes it'd be quite easy as its only a few functions or classes to change. If you have mysql_* functions all over the place, then it's pretty much an overhaul.
    First thing to do is make sure you have PDO and the available drivers. You'll know as soon as you call new PDO and give it the mysql drivers.
    Beyond that, the world is your oyster. You need to change it all so you can start where you want; partial PDO isn't compatible with partial mysql_*, so its all or none.

  • Users who have thanked Fou-Lu for this post:

    Chris-2k (10-19-2012)

  • #3
    Regular Coder Redcoder's Avatar
    Join Date
    May 2012
    Location
    /dev/null
    Posts
    335
    Thanks
    2
    Thanked 49 Times in 48 Posts
    Quote Originally Posted by Chris-2k View Post
    hi

    would this be easy to do? where would i start?
    For the research, there's this article I saw some time back: PDO - MySQLi Comparison. It gives the feeling of a smooth transition from mysql to PDO. It's a solid first step.
    It compares MySQLi and PDO. MySQLi is very similar in all aspects to the original mysql db driver, although of course faster and with many other enhancements. So you'll have no problems at all following the MySQLi code.

    You could later go to this one: PDO basics
    Last edited by Redcoder; 10-19-2012 at 06:57 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •