is there an index of old and new mysql/mysqli
I have searched around, but totally lost. Google is not my friend at this moment in time.
I am looking for an index of some kind that will give me basic examples like php.net does with then/now for each of the mysql commands and what they should be for mysqli. I understand that most of them you just swap the string and the command and remove the mysql_ but its the () part i am not clear on, as some of them you need the () and some you don't.
Any links that users can suggest ?
Sorry I just realised, that yes PHP.net does have the conversion of mysql to mysqli, but I wish to use the shorthand method.
That would be the object oriented method.
I'm not sure what you are looking for. The overview here: http://www.php.net/manual/en/book.mysqli.php would break down the mysqli classes into what they can do, and it is listed in overview only as the object oriented functionality.
Converting mysql to mysqli is not as simple as changing the functions. Even just sticking with the more traditional mysqli connection and mysqli result objects only, its still more complex than the mysql. Scope you now need to worry about (which is good, mysql should *never* have allowed global scope), and that doesn't even include the paradigm shift from procedural to object oriented.
Function names are otherwise pretty much identical between the mysql library functions and mysqli methods. Some of them are identical in every way shape and form *except* the addition of the 'i' in it (eg: mysqli_fetch_assoc($resource) is near identical, except that $resource must be an object of type mysqli_result instead of an actual resource). Procedural to OO is typically done by appending the library name to the method, and supplying it with the first argument of the type. [icode]$result->fetch_assoc();[icode] would then be
|All times are GMT +1. The time now is 09:33 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.