PHP函数更改MySQL数据库的排序规则
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP函数更改MySQL数据库的排序规则相关的知识,希望对你有一定的参考价值。
Function to fix char set and collation on mysql tables, see [this link](http://www.barattalo.it/2010/02/11/php-function-to-fix-collation-on-database-fields-of-mysql/ "Fix encoding on db")for examples and more infos.
function fix_encoding($reg='//',$set='utf8',$collation='utf8_general_ci') { echo $row[0] . " converted<br />"; } } }
以上是关于PHP函数更改MySQL数据库的排序规则的主要内容,如果未能解决你的问题,请参考以下文章
MySQL - 错误 1071 阻止更改字符集/排序规则,“指定的键太长......”
哪个 MySQL 排序规则与 PHP 的字符串比较完全匹配?