我正在使用SQLX和PQ通过PostGress查询SQL数据库。我将函数SelectfromSQLX与bindvars一起使用,但PQpanic与pq:got1parametersbutthestatementrequires0.query=`SELECTcount(*)AScountFROMledgerWHEREenterprise_id=($1)`varstatsingleStaterr=db.Select(&stat,query,enterpriseID) 最佳答案 如果有人到达这里,我通过深入研究pq源代码找到了答案。要在C