Unable to Store Arabic in MYSQL database using PHP

前端 未结 3 1601
一整个雨季
一整个雨季 2021-01-19 11:28

I have been trying to find a solution for past few hours but unable to do so. I have tried each and every possible solution on the Internet and this forum but nothing seems

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-19 12:08

    Since your data is unicode, use this query:

    $sql="update home set content=N'$content'";
    

    Notice the letter N (as in National).

    Google sql N prefix strings.

提交回复
热议问题