Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Mysql to Pdo conversion?
10-18-2012, 10:34 PM #1
- Join Date
- May 2011
- Thanked 0 Times in 0 Posts
Mysql to Pdo conversion?
would this be easy to do? where would i start?
10-18-2012, 11:08 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,648 Times in 2,617 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:
10-19-2012, 05:52 AM #3
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 05:57 AM.