I am trying to insert two rows of values to just two columns on a single query, following this much-decorated question, Inserting multiple rows in a single SQL query?, but with my code
DatabaseHelper helper = new DatabaseHelper(RegisterActivity.this);
database = helper.getWritableDatabase();
database.query("usersdata", fields, null, null, null, null, null);
database.rawQuery("INSERT INTO usersdata ( userName, userType ) VALUES " + "( '" + firstTime + "' , 'flag' ) , ( '" + name + "' , 'Owner' )", null);
database.close();
I receive the error
android.database.sqlite.SQLiteException: near ",": syntax error: , while compiling: INSERT INTO usersdata ( userName, userType ) VALUES ( 'hasBeenRegistered' , 'flag' ) , ( 'kwish' , 'Owner' )
It seems that my quotes aren't an issue, as it says: near "," which "," it has a problem with I don't know...I've also tried with no space after the quotes--not that that should matter. Any help on this would be greatly appreciated! TIA (Now seeing I didn't need to concatenate VALUES and the (, but that also shouldn't matter!)