V
V
Vladimir Grabko2016-06-20 04:46:17
MySQL
Vladimir Grabko, 2016-06-20 04:46:17

Why error 1054?

The code

res, err := db.G(DbName).Exec("INSERT INTO users(`login`, `email`, `pass`, `reg_time`, `auth_time`)"+
    "VALUES ($1, $2, $3, $4, $5)", name, email, pass, timestamp, timestamp)

mistake
Error 1054: Unknown column '$1' in 'field list'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Grabko, 2016-06-20
@VGrabko

$1 ... should be replaced with ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question