

Print(filtered_trips) # Print the filtered past trips lower() = location]įiltered_trips = # Filter past trips based on query parametersįiltered_trips = past_trips # Initialize the filtered trips list with all past tripsįiltered_trips =.

# Retrieve query parameters for filtering # Convert the rows into a list of dictionaries # Fetch past trip information from the databaseĬursor.execute("SELECT * FROM past_trips")
#Android use .db sqlite file code
Here is the code for my Flask app: methods=) I'm sure this is a simple fix but I have scoured the internet and have failed to find a solution to my specific predicament.


Currently, the user only has access to the most recent entry for that month, location or both. At the bottom of the browser there is a search that will allow the user to see camping trips by month, location or both. To clarify, the user logs a camping trip that includes: start_date, end_date, location, camping_site, weather, notes, and pictures. I want to be able to recall all entry's that satisfy parameters utilized. The user can recall 1 entry "row" based on 2 different parameters (month and/or location). I have created an html file that saves user inputs into an SQLite database. I am creating a camping log using SQLite. I have looked on Stack Overflow and become very familiar with Google, but I can not figure this out. Package tomschinler.thegreatman_kiniskamikazekaraoke import import import import 7.app.ActionBarActivity import android.os.Bundle import import import import import java.io.IOException public class SongActivity extends ActionBarActivity īEGIN TRANSACTION CREATE TABLE songList ( ` _id ` INTEGER PRIMARY KEY AUTOINCREMENT, ` Title ` TEXT, ` Artist ` TEXT, ` Decade ` INTEGER, ` Year ` INTEGER, ` Genre ` TEXT ) INSERT INTO songList VALUES ( 1, ' Great Balls of Fire ',' Jerry Lee Lewis ', 50, 1957, ' Rock ' ) INSERT INTO songList VALUES ( 2, ' Ring of Fire ',' Johnny Cash ', 60, 1963, ' Country ' ) INSERT INTO songList VALUES ( 3, ' Shaft ',' Shaft ', 70, 1971, ' Blues ' ) INSERT INTO songList VALUES ( 4, ' Hotel California ',' Eagles ', 70, 1973, ' Rock ' ) INSERT INTO songList VALUES ( 5, ' Take On Me ',' AHA ', 80, 1985, ' Pop ' ) INSERT INTO songList VALUES ( 6, ' Don '' t Stop Believing ',' Journey ', 80, 1981, ' Rock ' ) INSERT INTO songList VALUES ( 7, ' Friends in Low Places ',' Garth Brooks ', 90, 1991, ' Country ' ) INSERT INTO songList VALUES ( 8, ' Baby Got Back ',' Sir Mix - A - Lot ', 90, 1992, ' Hip Hop ' ) INSERT INTO songList VALUES ( 9, ' Hey Ya ',' OutKast ', 0, 2000, ' Hip Hop ' ) INSERT INTO songList VALUES ( 10, ' I Kissed a Girl ',' Katy Perry ', 0, 2007, ' Pop ' ) INSERT INTO songList VALUES ( 11, ' Just the way you are ',' Bruno Mars ', 10, 2010, ' Pop ' ) INSERT INTO songList VALUES ( 12, ' Super Bass ',' Nicki Minaj ', 10, 2010, ' Hip Hop ' ) CREATE TABLE android_metadata ( "locale" TEXT DEFAULT ' en_US ' ) INSERT INTO android_metadata VALUES ( ' en_US ' ) COMMIT It copies the database successfully, and then fails to open it. thegreatman_kiniskamikazekaraoke / databases / mankiniDB. c : 30191 : ( 2 ) open (/ data / data / tomschinler. thegreatman_kiniskamikazekaraoke E / SQLiteLog ﹕ ( 14 ) os_unix. thegreatman_kiniskamikazekaraoke E / SQLiteLog ﹕ ( 14 ) cannot open file at line 30191 of 03 - 10 18 : 52 : 07.568 10812 - 10812 / tomschinler. thegreatman_kiniskamikazekaraoke E / DefaultDatabaseErrorHandler ﹕ deleting the database file : / data / data / tomschinler. thegreatman_kiniskamikazekaraoke E / DefaultDatabaseErrorHandler ﹕ Corruption reported by sqlite on database : / data / data / tomschinler. thegreatman_kiniskamikazekaraoke E / SQLiteLog ﹕ ( 26 ) file is encrypted or is not a database 03 - 10 18 : 52 : 07.556 10812 - 10812 / tomschinler. thegreatman_kiniskamikazekaraoke W / SQLiteAssetHelper ﹕ database copy complete 03 - 10 18 : 52 : 07.544 10812 - 10812 / tomschinler. thegreatman_kiniskamikazekaraoke W / SQLiteAssetHelper ﹕ copying database from assets.
