Home >Backend Development >PHP Tutorial >Mysql workbench php adodb connects to mssql to solve the problem of garbled characters
Zhou Haihan/Text
ADO can use statements like new COM("ADODB.Connection", NULL, CP_UTF8)//65001 to achieve correct conversion. But ADO's support for php lacks documentation. There is open source adodb, which has rich documentation.
The method of setting UTF-8 is different for different database drivers, as follows:
Copy the code The code is as follows:
For all drivers
'persist', 'persistent', 'debug', ' fetchmode', 'new'
Interbase/Firebird
'dialect','charset','buffers','role'
M'soft ADO
'charpage'
MySQL
'clientflags'
MySQLi
'port', 'socket ', 'clientflags'
Oci8
'nls_date_format','charset'
For all drivers
'persist', 'persistent', 'debug', 'fetchmode', 'new'
Interbase/Firebird
'dialect','charset ','buffers','role'
M'soft ADO
'charpage'
MySQL
'clientflags'
MySQLi
'port', 'socket', 'clientflags'
Oci8
'nls_date_format','charset'
Copy the code The code is as follows:
"; <br>print_r($rs- >GetRows()); <br>print "";
The above introduces how mysql workbench php adodb connects to mssql to solve the garbled problem, including the content of mysql workbench. I hope it will be helpful to friends who are interested in PHP tutorials.