Answer the question
In order to leave comments, you need to log in
How to get value from database with two WHERE parameters?
Hello!
There is a code:
rows, err := db.Query("SELECT * FROM speach WHERE speach_globalnumber=? AND speach_localnumber=?", globalSpeachNumber, localSpeachNumber)
sql: expected 6 destination arguments in Scan, not 5
exit status 1
Answer the question
In order to leave comments, you need to log in
It is not necessary to write select * in the code - then the sides will come out. Here's how in this case. You specified the wrong number of variables for reading in Scan.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question