}
NSString*timeFormat = @"%Y-%m-%d";
NSString * sql = [NSString stringWithFormat:@"select * from T_TRAVEL_EXPENSE_RETURNTRIP where
strftime(‘%@‘,‘now‘) = strftime(‘%@‘,SRV_DATE) and USER_ID=‘%@‘ order by CREATE_TIME desc",timeFormat,timeFormat,userId];
if([db open])
{
FMResultSet * rs = [db executeQuery:sql];
while ([rs next])
{
原文:http://www.cnblogs.com/wxm5558/p/5816288.html