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 02-04-2013, 02:59 PM   PM User | #1
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,042
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
mysqli question primarily for Fou-Lu

Fou-Lu,

I'm curious about the change to "mysqli".

Let's say I've been in charge of several WordPress websites hosted on different shared webhosts. Eventually there will be the change to mysqli. What do I have to do on my end? Do I have to go to every website and redo my scripting from mysql to mysqli, or is the change seamless?

And that goes for websites where I've done custom "PHP/mysql" ... that doesn't have updates like WordPress does.
mlseim is offline   Reply With Quote
Old 02-04-2013, 03:10 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 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
I'd assume that CMS and similar software like wordpress will update their own storage handling, so you'll simply need to get an update for it. They may even use it now, or PDO.
If you've written something custom, and used the mysql library explicitly, than you'll need to rewrite those sections. If you've extended some functionality for something like wordpress, and used their access functions, than the conversion shouldn't need manual changing.
But it's all going to come down to the system's implementation of the mysqli. Since it uses both raw and prepared statements, I don't know what they will do for changes. My *guess* would be that prepared would run through different functionality than the existing ones, and the existing will continue to be raw. This way existing functionality will work without needing to perform modifications to code that currently uses them.
If its in the object oriented world, I'd expect an adapater of some sorts.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
mlseim (02-04-2013)
Old 02-04-2013, 04:11 PM   PM User | #3
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,042
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Thanks.
That reply was helpful to myself as well as many others (I would assume).
mlseim 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 07:44 PM.


Advertisement
Log in to turn off these ads.