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
my code:
var ad FlowAdUrlStat stmt := db.Session(&gorm.Session{DryRun: true}).Where("opt_YYYYMMDD = ?", 20240626).Take(&ad).Statement fmt.Println(stmt.SQL.String()) fmt.Println(stmt.Vars) if err := db.Where("opt_YYYYMMDD = ?", 20240626).Take(&ad).Error; err != nil { log.Fatal(err) } fmt.Println(ad)
output:
Type 'dlv help' for list of commands. SELECT * FROM flow_ad_url_stat WHERE opt_YYYYMMDD = ? LIMIT ? [20240626 1] 2024/06/26 18:07:03 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1: ...RE opt_YYYYMMDD = ? LIMIT ? ^ Encountered: ? Expected
flow_ad_url_stat
2024/06/26 18:07:03 D:/goproject/cloudsvc/dbutils/mysqlutil.go:63 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1: ...RE opt_YYYYMMDD = ? LIMIT ? ^ Encountered: ? Expected
[58.356ms] [rows:0] SELECT * FROM flow_ad_url_stat WHERE opt_YYYYMMDD = 20240626 LIMIT 1 Process 48512 has exited with status 1 Detaching
The text was updated successfully, but these errors were encountered:
jinzhu
No branches or pull requests
Your Question
my code:
output:
Type 'dlv help' for list of commands.
SELECT * FROM
flow_ad_url_stat
WHERE opt_YYYYMMDD = ? LIMIT ?[20240626 1]
2024/06/26 18:07:03 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1:
...RE opt_YYYYMMDD = ? LIMIT ?
^
Encountered: ?
Expected
2024/06/26 18:07:03 D:/goproject/cloudsvc/dbutils/mysqlutil.go:63 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1:
...RE opt_YYYYMMDD = ? LIMIT ?
^
Encountered: ?
Expected
[58.356ms] [rows:0] SELECT * FROM
flow_ad_url_stat
WHERE opt_YYYYMMDD = 20240626 LIMIT 1Process 48512 has exited with status 1
Detaching
The text was updated successfully, but these errors were encountered: