Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Booking App COM5007
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
austin.blanke
Booking App COM5007
Commits
2dbb8e22
Commit
2dbb8e22
authored
May 29, 2023
by
austin.blanke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possibly Finished
parent
ce152119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
DatabaseConnector.java
...om/example/bookingapp_austinblanke/DatabaseConnector.java
+3
-5
No files found.
app/src/main/java/com/example/bookingapp_austinblanke/DatabaseConnector.java
View file @
2dbb8e22
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment