mysql查询中的阿拉伯语值被数据库忽略


Arabic values in mysql query is Ignored by the database

我试图发送查询mysql插入一些值到表中,这不是我第一次这样做的东西,这是什么让我变得疯狂!当我打印查询时,它看起来像这样:

INSERT INTO hc_family_receive_relief(hc_received_kind hc_family_id hc_received_date、hc_received_month hc_received_year)VALUES ('89',' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ','30','5','2014')

这是我第一次面对这个问题,它的原因是什么?我甚至尝试将PHP file保存为UTF-8 , UTF-8 with out BOM,阿拉伯字符仍然没有插入到表中!.

下面是我用来从$_POST数组动态创建查询的函数:
function add_family_recieve_relief($array)
{
if(empty($array))
   return NULL;
$i = 0;
$titles = array();
$values = array();
$query = "INSERT INTO hc_family_receive_relief ";
foreach($array as $key => $value)
{
if($i == 0)
{
$titles[count($titles)] = "($key,";
$values[count($values)] = "('".$value."',";
}
if($i < count($array) - 1 && $i > 0)
{
$titles[count($titles)] = "$key,";
$values[count($values)] = "'".$value."',";
}
if($i == count($array) - 1)
{
$titles[count($titles)] = $key.") VALUES ";
$values[count($values)] = "'".$value."')";
}
$i++;
}
foreach($titles as $tvalue)
$query .= $tvalue;
foreach($values as $vvalue)
$query .= $vvalue;
echo $query;
$qresult = mysql_query($query);
if(!$qresult)
    return False;
else return True;
}

这是接收$_POST并将其传递给add_family_recieve_relief函数的页面:

<?
require_once('../db.php');
require_once('familyReliefAPI.php');
if($_POST['addfamilyrelief'])
{
  if(empty($_POST['hc_family_id']) || !is_numeric($_POST['hc_family_id']))
      die('<center><h4><font color="red">خطأ في المعالجة , الرقم المميز للعائلة غير موجود !</font></h4></center>');
         $family_id = $_POST['hc_family_id'];
         array_pop($_POST);
  $addfrr = add_family_recieve_relief($_POST);
  if(!$addfrr)
       die('<center><h4><font color="red">مشكلة في الاضافة , الرجاء التأكد من المعلومات أو الاتصال</font></h4></center>');
    else {
         //print_r($_POST);
         }
}
?>

我也使SET NAMES utf-8查询在连接页面来修复字符问题,但仍然不工作。请帮帮我…由于

注意:查询为真,并插入表中除了阿拉伯语字段的所有值,它留下空!

检查数据库中表的字符集