|
Mysql ภาษาไทยกลายเป็น ???? |
Monday, December 18, 2006 |
$charset = "SET character_set_results=tis620"; mysql_query($charset) or die("Invalid query: " . mysql_error());
ผลปรากฎว่าการกำหนดค่าให้ตัวแปร character_set_results มีค่าเป็น tis620 ดังกล่าว สามารถช่วยแก้ปัญหาแสดงผลภาษาไทยที่ไม่ถูกต้องได้ นอกจากนี้สามารถใช้คำสั่งต่อไปนี้ในการแก้ปัญหาภาษาไทย คือ
SET NAMES 'tis620' ซึ่งมีค่าเทียบเท่ากับ SET character_set_client='tis620'SET character_set_results='tis620'SET character_set_connection='tis620' SET character_set_results=NULL
ซึ่งมีความหมายคือ ไม่ต้องการให้ server ทำการแปลงข้อมูลก่อนที่จะทำการส่งให้กับ client
|
 |
|
|
|
Previous Post |
|
Archives |
|
Links |
|
Powered by |
|
|