Update main.go
This commit is contained in:
parent
9ace20ce5d
commit
d3cbeac65a
15
main.go
15
main.go
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user