Add escaping to order statement

This commit is contained in:
Dan Sosedoff
2016-11-03 19:56:55 -05:00
parent 812aff9686
commit d0d84a62cd
3 changed files with 23 additions and 1 deletions

View File

@@ -158,7 +158,7 @@ func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error)
opts.SortOrder = "ASC"
}
sql += fmt.Sprintf(" ORDER BY %s %s", opts.SortColumn, opts.SortOrder)
sql += fmt.Sprintf(` ORDER BY "%s" %s`, opts.SortColumn, opts.SortOrder)
}
if opts.Limit > 0 {