currentTime := time.Now().UTC().Format(layout)
prevTime := time.Now().UTC().Add(-time.Minute * 15).Format(layout)
currTime, _ := time.Parse("2006-01-02 15:04:05", currentTime)
previousTime, _ := time.Parse("2006-01-02 15:04:05", prevTime)
query := `
SELECT *
from %s
where
updated_on_utc > %v
and
updated_on_utc <= %v`
query = fmt.Sprintf(query, TableName, previousTime, currTime)
data := db.DbClient.ExecuteQuery(query)
this gives out the error message : panic: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '19:54:41 +0000 UTC and updated_on_utc <= 2023-06-08 20:09:41 +0000 UTC' at line 4
I have tried different queries with different placeholders but all of them give the same error