We know that the other drivers are depreciated and from php7 its recommended to use mysqli
methods. The problem is i came across codebase from a long time ago from one of my employer and he wants that updated.
Now there are around 3K files and the previous developer did a great job at putting in 3-5 mysql_query
calls in almost every file. How would you recommend updating all of them at once, maybe some kind of method overide trick if someone has had the same issue in future.
Currently i am working with 2 vim macros that find mysql_
keyword and replace with mysqli_
and the other one which adds $con
as first parameter to the method mysqli_connect
.
Even with this automation, i still need to open all files individually. Any better hack is appreciated that would prevent me from opening all the files manually and making changes.