vendredi 11 décembre 2015

How to get the count value from a go-sqlite3 query?

I am using go-sqlite3 to retrieve the number of rows with a column of a certain value:

query := "select count(notebook) from pages where notebook="
result, err := db.Query(fmt.Sprint(query, id))

Where id is passed to the function running the query.

How can I retrieve the count value from result?

Aucun commentaire:

Enregistrer un commentaire