import strutils, db_postgres var db = open("127.0.0.1", user="***", password="***",database="nimcn") var checkSql = sql"select id from Nimer where email = ? and pass_word =?" var email="zxg@126.com" var passWord="256e921e0909d11ba3e267843bfb9bd7" var rowId =db_postgres.getValue(db,checkSql,email,passWord) echo rowId db_postgres.close(db)
i get error at db_postgres.getValue(db,checkSql,email,passWord),i found the error in setupQuery function in db_postgres.nim.Who can help me?
Sounds like the same problem that is in db_mysql (https://github.com/nim-lang/Nim/issues/3220)
try
getAllRows(....)[0][0]
as a quick fix