I have a set of MySQL queries in PHP files. I want to mass-edit these queries, e.g. add an extra WHERE
开发者_StackOverflow中文版 or UPDATE
clause to all of them.
Is there any existing software that can do this?
It's very unlikely that you'll find something that's capable of interpreting however you've chosen to implement your SQL query execution, in part because there's a plethora of approaches even using the out of the box PHP options.
As such, I very much suspect you'll need to search for whatever query execution function/method is in use and backtrack from there. (I suspect you'd need to do this anyway, as simply "adding a clause" would require human judgement/interpretation to achieve anyway.)
Hopefully your choose IDE will have a nice project/workspace-wide search that will make this a fairly trivial, if somewhat time-consuming, task.
精彩评论