You've already forked gun-manager-backend
initial commit
This commit is contained in:
14
sql/photos.go
Normal file
14
sql/photos.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sql
|
||||
|
||||
func (dbClient *SqlDb) GetPhoto(id uint) string {
|
||||
var photo string
|
||||
|
||||
row := dbClient.db.QueryRow("SELECT photo from photos where id = ?", id)
|
||||
|
||||
err := row.Scan(&photo)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return photo
|
||||
}
|
||||
Reference in New Issue
Block a user