Friday, October 5, 2012

Multilaunguage



$db
= mysql_connect('YOUR_DB_ADDRESS','YOUR_DB_USER','YOUR_DB_PASS') or die("Database error");
mysql_select_db('YOUR_DB', $db);

//SOLUTION::  add this comment before your 1st query -- force multiLanuage support
$result = mysql_query("set names 'utf8'");

$query = "select * from YOUR_DB_TABLE";
$result = mysql_query($query);

//-THE_REST_IS_UP_TO_YOU-

?>

Simply run the query "set names 'utf8' " against the MySQL DB and your output should appear correct.


Multilaunguage

1 comment:

  1. Nice Blog to read and share Thanks for posting. Post as many blogs…............ Visit this site belongs to Oracle Fusion Training get more details from below site.
    Oracle Fusion Training Institute

    ReplyDelete