在Malayalam中将数据插入Mysql [英] Inserting data to Mysql in Malayalam

查看:89
本文介绍了在Malayalam中将数据插入Mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用PHP完成了将代码插入malayalam中的MySql中的代码.当我插入数据时,它在数据库中变为英语..我在代码和数据库utf8 general_ci中将字符集设置为utf-8.请任何人提前给出答案..谢谢

I have done a code in PHP to insert data into MySql in malayalam. When I insert data, It becomes English in database.. I have set charset to utf-8 in my code and in data base utf8 general_ci..please anyone give answer..thanks in advance

推荐答案

1)在php页的开头添加代码 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

1) Add the code beginning of the php page <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

2)确保您的数据库&表格在归类utf8_general_ci

2) Make sure your database & tables are on Collation utf8_general_ci

3)使用数据库连接代码: $ conn =新的mysqli($ server,$ user,$ password,$ database); $ conn-> set_charset("utf8");

3) Use the database connection code: $conn = new mysqli($server, $user, $password, $database); $conn->set_charset("utf8");

4)然后尝试使用$ conn处理程序插入查询并检索查询, 即:$ q_newspage ="SELECT * FROM news GROUP BY id DESC LIMIT 8"; $ qresult_newspage = $ conn-> query("$ q_newspage");

4) Then try insert query and retrieve query using $conn handler, ie: $q_newspage="SELECT * FROM news GROUP BY id DESC LIMIT 8"; $qresult_newspage=$conn->query("$q_newspage");

谢谢

这篇关于在Malayalam中将数据插入Mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆