My ultimate goal is to limit the entries that you can create in order to have a trial version of my application. I think I can do this quite simply by returning an int variable in the sqlite count expression and using a simple IF statement to determine if a new record should be created.
I call it this way:
int jcount = 0;
mDbHelper.countjournals (jcount);
I'm trying to execute this now
public int countjournals (int jcount) {
mDb.execSQL (jcount + "= SELECT COUNT (*) FROM" + DATABASE_JOURNAL_TABLE);
return jcount;
}
the error i get is:
08-27 22: 42: 32.417: ERROR / AndroidRuntime (3976): android.database.sqlite.SQLiteException: near "0": syntax error: 0 = SELECT COUNT (*) FROM journals