Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-18-2012, 10:34 PM   PM User | #1
Chris-2k
Regular Coder

 
Join Date: May 2011
Posts: 303
Thanks: 29
Thanked 0 Times in 0 Posts
Chris-2k is an unknown quantity at this point
Mysql to Pdo conversion?

hi

would this be easy to do? where would i start?
Chris-2k is offline   Reply With Quote
Old 10-18-2012, 11:08 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
Chris-2k (10-18-2012)
Old 10-19-2012, 05:52 AM   PM User | #3
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
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
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk

Last edited by Redcoder; 10-19-2012 at 05:57 AM..
Redcoder is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:31 PM.


Advertisement
Log in to turn off these ads.