From 65d6745a8b90933ca1b1330dbc5180f471556649 Mon Sep 17 00:00:00 2001 From: Nithya_Vishwa Date: Mon, 27 Jan 2025 14:22:22 +0530 Subject: [PATCH 1/2] Create Mini project backend --- Mini project backend | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Mini project backend diff --git a/Mini project backend b/Mini project backend new file mode 100644 index 0000000..3170dc3 --- /dev/null +++ b/Mini project backend @@ -0,0 +1,46 @@ +#backend +import sqlite3 + +def MovieData(): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("CREATE TABLE IF NOT EXISTS book (id INTEGER PRIMARY KEY, Movie_ID text,Movie_Name text,Release_Date text,Director text,Cast text,Budget text,Duration text,Rating text") + con.commit() + con.close() + +def AddMovieRec(Movie_ID,Movie_Name,Release_Date,Director,Cast,Budget,Duration,Rating): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("INSERT INTO book VALUES (NULL, ?,?,?,?,?,?,?,?)", (Movie_ID,Movie_Name,Release_Date,Director,Cast,Budget,Duration,Rating)) + con.commit() + con.close() + +def ViewMovieData(): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("SELECT * FROM book") + rows=cur.fetchall() + con.close() + return rows + +def DeleteMovieRec(id): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("DELETE FROM book WHERE id=?", (id,)) + con.commit() + con.close() + +def SearchMovieData(Movie_ID="",Movie_Name="",Release_Date="",Director="",Cast="",Budget="",Duration="",Rating=""): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("SELECT * FROM book WHERE Movie_ID=? OR Movie_Name=? OR Release_Date=? OR Director=? OR Cast=? OR Budget=? OR Duration=? OR Rating=?",(Movie_ID,Movie_Name,Release_Date,Director,Cast,Budget,Duration,Rating)) + rows=cur.fetchall() + con.close() + return rows + +def UpdateMovieData(id,Movie_ID="",Movie_Name="",Release_Date="",Director="",Cast="",Budget="",Duration="",Rating=""): + con=sqlite3.connect("movie1.db") + cur=con.cursor() + cur.execute("UPDATE book SET Movie_ID=?,Movie_Name=?,Release_Date=?,Director=?,Cast=?,Budget=?,Duration=?,Rating=?, WHERE id=?",(Movie_ID,Movie_Name,Release_Date,Director,Cast,Budget,Duration,Rating)) + con.commit() + con.close() From 7fb7acd62cd336c55bb3e63a527f7b721a0e1628 Mon Sep 17 00:00:00 2001 From: Nithya_Vishwa Date: Mon, 3 Feb 2025 14:55:50 +0530 Subject: [PATCH 2/2] Update buck config --- .buckconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buckconfig b/.buckconfig index 934256c..0f6db72 100644 --- a/.buckconfig +++ b/.buckconfig @@ -1,4 +1,4 @@ - +Example [android] target = Google Inc.:Google APIs:23