Use byte slice instead of arrays

This commit is contained in:
nemunaire 2016-01-19 13:09:36 +01:00
commit 5a2a950b1f
2 changed files with 20 additions and 7 deletions

View file

@ -34,7 +34,7 @@ func (t Theme) GetExercice(id int) (Exercice, error) {
}
func (t Theme) GetExercices() ([]Exercice, error) {
if rows, err := DBQuery("SELECT id_exercice, title, statement, hint, depend, gain, video_uri FROM teams WHERE id_theme = ?", t.Id); err != nil {
if rows, err := DBQuery("SELECT id_exercice, title, statement, hint, depend, gain, video_uri FROM exercices WHERE id_theme = ?", t.Id); err != nil {
return nil, err
} else {
defer rows.Close()