So I'm having to change all my procedural PHP code - upgrading the soon to be deprecated MySQL functions with the replacement MySQLi functions.
Unfortunately it's not just a case of adding an "i" as some of the parameters have changed.
MySQL_query($sql) to MySQLi_query($con, $sql)
This is annoying as it's the most common and it needs a new connection parameter adding.
MySQL_connect to MySQLi_connect
Replacing the 4th parameter of "true" with the database name.
MySQL_select_db($db, $con) to MySQLi_select_db($con, $db)
Swapping the parameters - so another annoying one. Although if I add the database name to the MySQLi_connect fourth parameter, I don't need this select the database line.
MySQL_insert_id to MySQLi_insert_id
Adding the connection parameter
MySQL_real_escape_string($str) to MySQLi_real_escape_string($con, $str)
Adding the connection parameter
I've done one site so far. One issue is that I have to update the entire site in one go - I can't do it in stages. All connections go through a single function - so as soon as that's changed - every page which calls it stops working. If I update all the other bits first, they won't work until the connection has been updated…so I'll need to think of some way to deal with this…
Update: 02Jan13
If a connection is created, then used in a function, its scope used to extend down into the function. This no longer happens. I've now to either pass the connection as a parameter into the function or add global $con; to the function - explicitly making it global.
Responsive and mobile websites
2013Searching sent emails in Outlook 2010
2012Changing PHP extensions from MySQL to MySQLi
Recent project - my own cash flow reporting
First tax return and my invoicing system
Google.co.uk home page now https
Content Management Systems CMS
Adding an eCommerce online shop to my own site.
2011Recent project - eCommerce website, online shop
Slow broadband in the evenings
Website updates - dynamic menu and executing PHP in a .html page
The transition from Microsoft Access to PHP/MySQL
Working with a range of coding languages
Software development environments - IDEs
Object orientated coding V's procedural
2010