-
-
Save codecademydev/5003a01382d544b422824800675e24b5 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { printQueryResults } = require('./utils'); | |
// require the 'sqlite3' package here | |
const sqlite3 = require('sqlite3'); | |
// open up the SQLite database in './db.sqlite' | |
const db = new sqlite3.Database('./db.sqlite'); | |
db.all('SELECT * FROM TemperatureData ORDER BY year', (error, rows) => { | |
if (error) { | |
throw error; | |
} | |
printQueryResults(rows); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment