开发者

Problem with xCode programming SQL Table

NSString *sql = [NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS '%@' ('%@' TEXT PRIMARY KEY, '%@' TEXT);", tableName, field1, field2];

I faced quite a lot of problems开发者_如何学Go with this line of programming, can anyone help me solve the problem? I'm new to Xcode. Thanks! :)


Try without the single quotes

SString *sql = [NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS %@ (%@ TEXT PRIMARY KEY, %@ TEXT);", tableName, field1, field2];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜