为什么我无法将\\\符号导入数据库? [关闭]

问题描述 投票:-2回答:1
我尝试导入数据库时​​遇到问题,因为所有\都无法导入数据库。例如,sql文件中的\(-2\)在我的数据库中将是(-2)。我如何解决我的问题?
php database import mathjax
1个回答
0
投票
您需要转义反斜线:

INSERT INTO table (col) VALUES ( '\\(-2\\)')

Reference (with the list of all characters you must escape for mysql)
© www.soinside.com 2019 - 2024. All rights reserved.