|
|
@@ -18,7 +18,7 @@
|
|
|
+ (int) get_recordid:(sqlite3*)db table:(NSString*) tablename where:(NSString*) whereclause order:(NSString*) orderby
|
|
|
{
|
|
|
int ret = -1;
|
|
|
- NSString *sqlQuery = [NSString stringWithFormat:@"select _id from %@ where %@ orderby %@",tablename,whereclause,orderby];
|
|
|
+ NSString *sqlQuery = [NSString stringWithFormat:@"select _id from %@ where %@ order by %@",tablename,whereclause,orderby];
|
|
|
sqlite3_stmt * statement;
|
|
|
|
|
|
if (sqlite3_prepare_v2(db, [sqlQuery UTF8String], -1, &statement, nil) == SQLITE_OK)
|