问题描述
for(int j = 0,bool comma = false; j < size; j++)
{
if (price[i][j] > 0)
{
if (comma)
cout << ",";
cout << airports[j];
comma = true;
}
}
这是其他表格,但是可以。我对他们没有问题:
CREATE TABLE IF NOT EXISTS[Goods]
(GoodId INTEGER PRIMARY KEY AUTOINCREMENT,GoodName varchar(100) not null,CategoryId INTEGER FOREIGN KEY (CategoryId) REFERENCES Category (CategoryId),ProducerId INTEGER FOREIGN KEY (ProducerId) REFERENCES Producer (ProducerId),Price REAL not null,GoodCount REAL not null)
解决方法
内联外键不使用FOREIGN KEY
关键字。
考虑:
CREATE TABLE IF NOT EXISTS[Goods] (
GoodId INTEGER PRIMARY KEY AUTOINCREMENT,GoodName varchar(100) not null,CategoryId INTEGER REFERENCES Category (CategoryId),ProducerId INTEGER REFERENCES Producer (ProducerId),Price REAL not null,GoodCount REAL not null
)