我有一张阿拉伯文字表。我想删除重复的行。在阿拉伯语鉴于符号:如何删除考虑阿拉伯语音标的重复行
我的表:vocabulary
+----+----------+--------------------------------+
| id | word | mean |
--------------------------------------------------
| 1 | سِلام | xxx |
--------------------------------------------------
| 2 | سَلام | xxx |
--------------------------------------------------
| 3 | سلام | xxx |
--------------------------------------------------
| 4 | سلام | xxx |
+------------------------------------------------+
现在我想这个表:
+----+----------+--------------------------------+
| id | word | mean |
--------------------------------------------------
| 1 | سِلام | xxx |
--------------------------------------------------
| 2 | سَلام | xxx |
--------------------------------------------------
| 3 | سلام | xxx |
+------------------------------------------------+
我该怎么办呢?!
我尝试:
$result = mysql_query("SELECT * FROM vocabulary where");
while($end = mysql_fetch_assoc($result)){
$word = $end["word"];
$mean = $end["mean"];
$id = $end["id"];
$result2 = mysql_query("SELECT * FROM vocabulary where word='$word' AND mean='$mean'");
$TotalResults = mysql_num_rows($result2);
if($TotalResults>1){
mysql_query("DELETE FROM vocabulary WHERE id='$id'");
}
摘要:我怎么能敏感MySQL的阿拉伯文的符号?
@diggersworld我会加我的试试 – Shafizadeh
请不要告诉我:不要再使用'mysql_ *'了......!我知道了! – Shafizadeh
[删除MySQL中的重复行](http:// stackoverflow。com/questions/3311903/remove-duplicate-rows-in-mysql) – umka