PHP uses sqlsrv to query a field in a remote sql2008 data table that has a field named Chinese that does not take a value. As shown below:
Query statement:
Select top 1 customid, requirement ID, requirement type, requirement description, resolution time limit, demand submission time, flag, lastmodify from D_ request Submit ORDER by Customid
The results obtained:
Customer number: 500364, request Number: Demand Type: Demand Description: Resolution Time: Demand Submission time: Mark: Last modified: 1014
As shown above: Only Customid and lastmodify take the value
encoding specified when connecting to the library: Characterset=>utf-8
Urgent, online etc!
Reply to discussion (solution)
Escape, yes!
Select top 1 customid,[requirements id],[Requirements Type],[requirements Description],[Resolution Time],[Demand submission time],[flag],lastmodify from [d_ demand submission] ORDER by Customid
You create a query in the controller and you know how to write it.
Escape, yes!
Select top 1 customid,[requirements id],[Requirements Type],[requirements Description],[Resolution Time],[Demand submission time],[flag],lastmodify from [d_ demand submission] ORDER by Customid
You create a query in the controller and you know how to write it.
What do you mean by escaping? Like you above this writing in the sql2008 is normal, but PHP is the same as the Chinese text field does not get the value ah, escaped is?
[] Bracket is the name of SQL Server escape character, and MySQL's "the same role
SQL Server field name does not support UTF-8 encoding
Two-byte encoding (Unicode) operating system is the invention of Microsoft, Utf-8 is only designed to be compatible with UTF standards
You have a weird problem, you can try to convert the query string to GBK or ucs-2 encoded look
Conversion, the problem still has
Do It yourself! Making a field name in Chinese is a mistake in itself
Not at hand. SQL Server failed to test
Problem solved, Chinese text segment real Pit