+(XYZAnswers *)myAnswerWithDate:(NSString *)date
{
NSString *sqlString = [NSString stringWithFormat:@"SELECT * FROM MyAnswers WHERE dateString = '%@'",date];
sqlite3_stmt *statement = [[XYZSQLConnection shareSQLConnection] sqlPrepare:sqlString];
XYZAnswers *tempAnswer = [[XYZAnswers alloc] init];
while (sqlite3_step(statement) == SQLITE_ROW)
在进行
sqlite3_step(statement) 操作后记得sqlite3_finalize(statement); 释放资源
不然数据库出于自我保护,就会报这个错