Quantcast
Viewing latest article 2
Browse Latest Browse All 3

A script to change all tables and fields to the utf-8-bin collation in MYSQL

Method 1 ———————————– <?php // your connection mysql_connect(“localhost”,”root”,”***”); mysql_select_db(“db”); // convert code $res = mysql_query(“SHOW TABLES”); while ($row = mysql_fetch_array($res)) { foreach ($row as $key => $table) { mysql_query(“ALTER TABLE ” . $table . ” CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci”); echo $key . ” =&gt; ” . $table . ” CONVERTED<br />”; } […]

The post A script to change all tables and fields to the utf-8-bin collation in MYSQL appeared first on What web developer needs?.


Viewing latest article 2
Browse Latest Browse All 3

Trending Articles