mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
fix db
This commit is contained in:
parent
d0161d748a
commit
96419e62a3
@ -176,9 +176,9 @@ dbrecord dbselect(sqlite3* db, const char* table,const char* fstring,...)
|
||||
}
|
||||
int hastable(sqlite3* db,const char* table)
|
||||
{
|
||||
char * prefix = __s("type='table' and name='%s'",table);
|
||||
dbrecord rc = dbselect(db,"sqlite_master",prefix);
|
||||
free(prefix);
|
||||
//char * prefix = __s("type='table' and name='%s'",table);
|
||||
dbrecord rc = dbselect(db,"sqlite_master","type='table' and name='%s'", table);
|
||||
//free(prefix);
|
||||
if(!rc) return 0;
|
||||
if(!rc->fields) return 0;
|
||||
free(rc);
|
||||
|
Loading…
Reference in New Issue
Block a user