4,011
社区成员
发帖
与我相关
我的任务
分享
BOOL exist_in_db(char *pathstr)
{
char sql_query[128]={0};
sprintf(sql_query,"select count(*) from FailTable where path='%s'",pathstr);
sqlite3_stmt *pstmt;
sqlite3_prepare(sms_sqlite_db(), sql_query, strlen(sql_query), &pstmt, NULL);
sqlite3_step(pstmt);
int count=sqlite3_column_int(pstmt,0);
sqlite3_finalize(pstmt);
if(count > 0)
return TRUE;
return FALSE;
}
select count(*) from table where filed='xxxx'