且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建数据库时出现问题

更新时间:2021-11-30 09:43:10



我有几点建议,这篇文章可能不是实际的解决方案(我没有使用MySql,但在SQL Server 2005中使用过),但是请考虑

(1)正在创建"tinyint"类型的"available"列,但分配的默认值是字符类型("1"),相反,在我看来应该像这样

Hi,

I have couple of suggestion and this post might not be the actual solution( I have not worked using MySql but in SQL Server 2005), but please consider

(1) column "available" is being created of type tinyint but default value assigned is being of character type(''1'') instead it looks to me that it should have been like this

available tinyint(1) NOT NULL default 1,
....
--do the same for "system" column
system tinyint(1) NOT NULL default 0,



请告诉我是否有帮助.



Please let me know if it helps.


问题是反斜杠.
在您应用的某个位置(我假设您正在开发一个),您有一个代码,每次看到单引号时都会添加一个反斜杠.

您应该删除该问题代码.
或在执行查询之前添加其他代码以消除反斜杠.
The problem is the backslash.
Somewhere in your app (I''m assuming you''re working on one), you have a code that adds a backslash every time it sees a single quote.

You should remove that problem code.
Or add another code to remove the backslash before executing your query.