The existing SQL statements are as follows:
INSERT into Test (A, B) values (' $A ', ' $B ')
Update test set a= ' $A ' where b= ' $B '
Because of the multi-language problem, you now need to replace the SQL statement with the following:
INSERT into Test (A, b) VALUES (n ' $A ', n ' $B ')
Update test set a=n ' $A ' where b=n ' $B '
Can I use a regular replacement in a text editor (Phpdesigner 8,notepad++,editplus) to achieve bulk substitution?
Because the document is too much, really can't afford to change
Ask God for help
Reply to discussion (solution)
Can you change the type of the field?
NVARCHAR Change to VARCHAR
Regular replacement of PHP
$txt = Preg_replace ("/' \$\w/", ' n$0 ', $txt);
The existing SQL statements are as follows:
INSERT into Test (A, B) values (' $A ', ' $B ')
Update test set a= ' $A ' where b= ' $B '
Because of the multi-language problem, you now need to replace the SQL statement with the following:
INSERT into Test (A, b) VALUES (n ' $A ', n ' $B ')
Update test set a=n ' $A ' where b=n ' $B '
Can I use a regular replacement in a text editor (Phpdesigner 8,notepad++,editplus) to achieve bulk substitution?
Because the document is too much, really can't afford to change
Ask God for help
Well, it would have been varchar before, but later because of the German-language relationship, if it was varchar, the storage in the database would become? , so only modified the database type is nvarchar, but in this case the SQL must be added N in order to have no problem, so I want to find some way to replace the code in bulk
Can you change the type of the field?
NVARCHAR Change to VARCHAR
Regular replacement of PHP
$txt = Preg_replace ("/' \$\w/", ' n$0 ', $txt);
Well, it would have been varchar before, but later because of the German-language relationship, if it was varchar, the storage in the database would become? , so only modified the database type is nvarchar, but in this case the SQL must be added N in order to have no problem, so I want to find some way to replace the code in bulk
I solved it myself.