We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用gorm更新数据时报错 sql: expected 0 arguments, got 2
参考文档写的,并且各个AI都没有发现问题所在
gorm.io/gorm v1.26.1
result := erpDb.Table(g.orderTableName). Where("order_no = ? AND order_status <> 2", orderNo). Update("order_status", status) if result.Error != nil { slog.Error("更新ERP订单状态异常: " + result.Error.Error()) return result.Error }
但是日志中可见sql都是正确的 2025-05-09 14:17:55 DEBUG E:/Project/Go/b2b_sync_next/internal/task/task_order.go:111 sql: expected 0 arguments, got 2 [0.504ms] [rows:0] UPDATE "sync_order" SET "order_status"=3 WHERE order_no = '25032611090764727001' AND order_status <> 2
The text was updated successfully, but these errors were encountered:
使用的自定义驱动,ODBC连接的sqlserver
Sorry, something went wrong.
jinzhu
No branches or pull requests
Your Question
使用gorm更新数据时报错 sql: expected 0 arguments, got 2
参考文档写的,并且各个AI都没有发现问题所在
The document you expected this should be explained
Expected answer
gorm.io/gorm v1.26.1
但是日志中可见sql都是正确的
2025-05-09 14:17:55 DEBUG E:/Project/Go/b2b_sync_next/internal/task/task_order.go:111 sql: expected 0 arguments, got 2
[0.504ms] [rows:0] UPDATE "sync_order" SET "order_status"=3 WHERE order_no = '25032611090764727001' AND order_status <> 2
The text was updated successfully, but these errors were encountered: