Can this replacement be implemented? The existing SQL statement is as follows:
Insert into test (A, B) values ('$ A',' $ B ')
Update test set A = '$ a' where B =' $ B'
Due to the problem of multiple languages, you 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 regular expressions in the text editor (phpDesigner 8, Notepad ++, EditPlus) to replace them in batches?
Because there are too many files to be changed.
Please help me
Reply to discussion (solution)
Can't you change the field type?
Change NVARCHAR to VARCHAR.
Php regular expression replacement
$ Txt = preg_replace ("/'\ $ \ w/", 'n' $ 0', $ txt );
The existing SQL statement is as follows:
Insert into test (A, B) values ('$ A',' $ B ')
Update test set A = '$ a' where B =' $ B'
Due to the problem of multiple languages, you 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 regular expressions in the text editor (phpDesigner 8, Notepad ++, EditPlus) to replace them in batches?
Because there are too many files to be changed.
Please help me
Well, it was originally a varchar, but then, due to the German relationship, if it was a varchar, the in-database storage would become? So I changed the database type to nvarchar, but in this case, N must be added in the SQL statement to ensure it is okay, so I want to find a way to replace the code with regular expressions in batches.
Can't you change the field type?
Change NVARCHAR to VARCHAR.
Php regular expression replacement
$ Txt = preg_replace ("/'\ $ \ w/", 'n' $ 0', $ txt );
Well, it was originally a varchar, but then, due to the German relationship, if it was a varchar, the in-database storage would become? So I changed the database type to nvarchar, but in this case, N must be added in the SQL statement to ensure it is okay, so I want to find a way to replace the code with regular expressions in batches.
I fixed it myself and closed it.