Commit 2dbb8e22 authored by austin.blanke's avatar austin.blanke

Possibly Finished

parent ce152119
......@@ -378,13 +378,13 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
cursor.moveToFirst();
PID = cursor.getString(1);
String query2 = "SELECT * FROM " + TABLE_PERFORMANCES + " WHERE " + COLUMN_PERFORMANCEID + " = \"" + PID + "\"";
Cursor cursor2 = db.rawQuery(query2, null);
cursor2.moveToFirst();
newTicketCount1 = (Integer.valueOf(cursor2.getString(10)) + Integer.valueOf(cursor.getString(2)).toString());
newTicketCount2 = (Integer.valueOf(cursor2.getString(13)) + Integer.valueOf(cursor.getString(3)).toString());
newTicketCount3 = (Integer.valueOf(cursor2.getString(16)) + Integer.valueOf(cursor.getString(4)).toString());
newTicketCount1 = (Integer.valueOf(Integer.valueOf(cursor2.getString(10)) + Integer.valueOf(cursor.getString(2))).toString());
cursor.close();
cursor2.close();
......@@ -392,8 +392,6 @@ public class DatabaseConnector extends SQLiteOpenHelper {
ContentValues values2 = new ContentValues();
values2.put(COLUMN_TICKET1CNT, newTicketCount1);
values2.put(COLUMN_TICKET2CNT, newTicketCount2);
values2.put(COLUMN_TICKET3CNT, newTicketCount3);
String whereClause = COLUMN_PERFORMANCEID + " = " + "\"" + PID + "\"";
db.update(TABLE_PERFORMANCES, values2, whereClause, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment