mysql and encoding

后端 未结 3 2076
一向
一向 2021-01-15 11:15

I moved my php application to the new server. i use mysql5 db. When i\'m Updating or Inserting something to db, every \" and - sign changed to

3条回答
  •  借酒劲吻你
    2021-01-15 11:47

    SET NAMES UTF8 should be used on every page, when selecting as well as when updating or inserting.

    actually this query must be used every time you connect to the database. just add it to connect code.

提交回复
热议问题