You've already forked gun-manager-backend
15 lines
232 B
Go
15 lines
232 B
Go
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
|
|
}
|