--- cel_sqlite3_custom.c 2011-07-15 02:13:06.000000000 +0600 +++ cel_sqlite3_custom.c 2011-12-05 16:32:58.232122159 +0500 @@ -321,7 +321,7 @@ } /* is the table there? */ - sql = sqlite3_mprintf("SELECT COUNT(AcctId) FROM %q;", table); + sql = sqlite3_mprintf("SELECT COUNT(*) FROM %q;", table); res = sqlite3_exec(db, sql, NULL, NULL, NULL); sqlite3_free(sql); if (res != SQLITE_OK) {