forked from danielkurniadi/clickhouse
-
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
GORM Playground Link
Description
var records []*ActivationGeneration
if err := conn.Table(repo.GetTableName(tenantID)).Where("tenant_id = ? AND date(create_time) = ?", tenantID, dateStr).Find(&records).Error; err != nil {
return nil, err
}
执行代码报这个错
SQL: 2025/05/16 09:54:21 activation_generation.go:64 code: 62, message: Syntax error: failed at position 63 ('?'): ? AND da
te(create_time) = ? VALUES. Expected one of: CAST operator, ANY, ALL, NOT, INTERVAL, CASE, DATE, TIMESTAMP, tuple, collection of literals, array, number, literal, NULL,
Bool, true, false, string literal, asterisk, qualified asterisk, compound identifier, list of elements, identifier, COLUMNS matcher, COLUMNS, qualified COLUMNS matcher,
substitution, MySQL-style global variable
[72.502ms] [rows:0] SELECT * FROM `t_activation_generation_ybx` WHERE tenant_id = 'ybx' AND date(create_time) = '2025-05-12'
这是为什么呀
Metadata
Metadata
Assignees
Labels
No labels