Closed
Description
I tried to run this sql command, the query uses the limit and offser but bypass the orderBy.
In the other hand, If I wrote the query manually (SELECT * FROM partner ORDER BY id DESC) works perfectly
// The inputs I recive are of this type orderBy string, limit, offset int64 query := "SELECT * FROM partner ORDER BY ? LIMIT ? OFFSET ?" stmt, err := db.Prepare(query) if err != nil { return } defer stmt.Close() rows, err := stmt.Query(orderBy, limit, offset)
Metadata
Metadata
Assignees
Labels
No labels