Update main.go

This commit is contained in:
s441433 2018-12-29 02:31:03 +01:00
parent 9ace20ce5d
commit d3cbeac65a

15
main.go
View File

@ -31,19 +31,20 @@ func panel(w http.ResponseWriter, r *http.Request) {
rows, err := db.Query("SELECT * FROM users")
checkErr(err)
var IDusers int
var Username string
var User string
var Password string
var PIN int
var RFID int
for rows.Next() {
err = rows.Scan(&IDusers, &Username, &Password, &PIN, &RFID)
err = rows.Scan(&IDusers, &User, &Password, &PIN, &RFID)
checkErr(err)
fmt.Printf("%d, %s, %s, %d, %d \n", IDusers, Username, Password, PIN, RFID)
fmt.Fprintln(w, IDusers)
fmt.Fprintln(w, ". ")
fmt.Fprintln(w, Username)
fmt.Fprintln(w, "\n")
fmt.Printf("%d. %s, %s, %d, %d \n", IDusers, User, Password, PIN, RFID)
fmt.Fprint(w, IDusers)
fmt.Fprint(w, ". ")
fmt.Fprint(w, User)
fmt.Fprint(w, " \n")
}
rows.Close()
db.Close()