امتیاز موضوع:
  • 12 رأی - میانگین امتیازات: 2.42
  • 1
  • 2
  • 3
  • 4
  • 5
تبدیل collation کلیه جداول به utf8
#6
سلام مجدد
مشکلم رفع شد
بگم شاید به درد کسی خورد

این کد تمام جداول رو به utf8 تبدیل میکنه

<?php
// your connection
mysql_connect("localhost","root","***");
mysql_select_db("DatabaseName");

// 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_general_ci");
echo $key . " =&gt; " . $table . " CONVERTED<br />";
}
}
?>


همونطور که مهندس فرمود یه فایل php درست میکنیم در مسیر ویتایگر و اونو فراخوانی میکنیم و mysql_connect("localhost","root","***"); و به جای روت یوزر و * پسورد وارد میکنیم و تمام
پاسخ
سپاس شده توسط:


پیام‌های داخل این موضوع

پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'favtiger_mybb.mybb_threadviews' doesn't exist
Query:
INSERT INTO mybb_threadviews (tid) VALUES('10')

If you're a visitor of this website, please wait a few minutes and try again. If this problem persists, please contact the site owner.

If you are the site owner, please check the MyBB Documentation for help resolving common issues, or get technical help on the MyBB Community Forums.