|
 |
|
ส่งค่าตังแปรเป็นภาษาไทยในการ Select ข้อมูลขึ้นมาโชว์แล้วมันกลายเป็นภาษาต่างดาวนะแก้ไงได้บ้างครับ |
|
 |
|
|
 |
 |
|
รูปเล็กมากมองไม่เห็นครับ
|
 |
 |
 |
 |
Date :
2009-05-30 15:21:02 |
By :
adaaugusta |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอาไหม่นะครับ
คือว่าผมส่งค่าตัวเเปรมาจากFrom1 ไปFrom2ด้วย
<A HREF="result_perfull.php?dd=<?=$colname_rsper?>" target="_blank">รูปแบบเต็ม</A>
ค่าที่อยู่ในตัวแปร dd เป็นภาษาไทยนะคับ เเต่พอส่งไปอีกFromมันกลายเป็นภาษาต่างด่วไปเลยดังรูป
ช่วยที่คับ
|
 |
 |
 |
 |
Date :
2009-05-30 16:14:48 |
By :
HAD4778 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
SELECT `tb_assets`.`id`, `tb_assets`.`id_assets`, `tb_assets`.`name_assets`, `tb_assets`.`id_typeassets`, `tb_assets`.`number_assets`, `tb_assets`.`fuel_date`, `tb_assets`.`fuel_month`, `tb_assets`.`fuel_year`, `tb_assets`.`price_assets`, `tb_assets`.`id_cause`, `tb_assets`.`id_sectionassets`, `tb_assets`.`year`, `tb_assets`.`mark`, `tb_assets`.`reg_date`, `tb_cause`.`id_cause`, `tb_cause`.`name_cause`, `tb_cause`.`reg_date`, `tb_typeassets`.`id_typeassets`, `tb_typeassets`.`typeassets`, `tb_typeassets`.`reg_date`, `tb_sectionassets`.`id_sectionassets`, `tb_sectionassets`.`name_sectionassets`, `tb_sectionassets`.`reg_date` FROM `tb_assets` Inner Join `tb_cause` ON `tb_cause`.`id` = `tb_assets`.`id_cause` Inner Join `tb_typeassets` ON `tb_typeassets`.`id` = `tb_assets`.`id_typeassets` Inner Join `tb_sectionassets` ON `tb_sectionassets`.`id` = `tb_assets`.`id_sectionassets` WHERE `tb_assets`.`id_assets` LIKE '%���%' or `tb_assets`.`name_assets` LIKE '���%'
|
 |
 |
 |
 |
Date :
2009-05-30 16:15:50 |
By :
HAD4778 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองอย่างนี้ครับ เซต ภาษาในหัวไฟล์ให้เป็น
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
ถ้าไม่ได้ก็
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
ถ้ายังไม่ได้อีก หรือ ข้อมูลดังกล่าวข้างต้น เอามาจาก DB ให้ใส่
$cs1 = "SET character_set_results=tis620";
mysql_query($cs1) or die('Error query: ' . mysql_error());
$cs2 = "SET character_set_client = tis620";
mysql_query($cs2) or die('Error query: ' . mysql_error());
$cs3 = "SET character_set_connection = tis620";
mysql_query($cs3) or die('Error query: ' . mysql_error());
ต่อจากคำสั่งคอนเน็กชั่นครับ
ถ้ายังไม่ได้อีกให้ใส่
$cs1 = "SET character_set_results=UTF8";
mysql_query($cs1) or die('Error query: ' . mysql_error());
$cs2 = "SET character_set_client = UTF8";
mysql_query($cs2) or die('Error query: ' . mysql_error());
$cs3 = "SET character_set_connection = UTF8";
mysql_query($cs3) or die('Error query: ' . mysql_error());
ต่อจากคำสั่งคอนเน็กชั่นครับ
ลองดู
|
 |
 |
 |
 |
Date :
2009-05-30 16:50:28 |
By :
adaaugusta |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยังไม่ได้เลยคับทามไง
|
 |
 |
 |
 |
Date :
2009-06-01 08:38:57 |
By :
HAD4778 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเปลียนเป็นแบบนี้นะ
Code (PHP)
<?php
"LIKE '%" . iconv('UTF-8','TIS-620', $keyword) . "%'"
?>
ไม่ก็
Code (PHP)
<?php
"LIKE '%" . iconv('TIS-620','UTF-8', $keyword) . "%'"
?>
|
 |
 |
 |
 |
Date :
2009-06-01 11:35:46 |
By :
danya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับผู้รู้ทุกท่าน
|
 |
 |
 |
 |
Date :
2009-06-09 14:08:50 |
By :
HAD4778 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|