db_select
This commit is contained in:
parent
6f21e0af4c
commit
c2b8b0ffd3
1 changed files with 0 additions and 12 deletions
|
|
@ -7,17 +7,6 @@ import (
|
|||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
// func db_query (dbPath string, sqlStatement string) (*sql.Rows) {
|
||||
// db, _ := sql.Open("sqlite3", dbPath)
|
||||
// defer db.Close()
|
||||
|
||||
// res, err := db.Query(sqlStatement)
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
|
||||
func db_exec (dbPath string, sqlStatement string) {
|
||||
db, _ := sql.Open("sqlite3", dbPath)
|
||||
defer db.Close()
|
||||
|
|
@ -33,7 +22,6 @@ func db_select(dbPath string) (dbHosts []Host) {
|
|||
defer db.Close()
|
||||
|
||||
sqlStatement := `SELECT * FROM "now"`
|
||||
//res := db_query(dbPath, sqlStatement)
|
||||
|
||||
res, err := db.Query(sqlStatement)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue