Flowdock
method

sanitize_sql_for_order

Importance_1
v5.1.7 - Show latest stable - 0 notes - Class: ClassMethods
sanitize_sql_for_order(condition) private

Accepts an array, or string of SQL conditions and sanitizes them into a valid SQL fragment for an ORDER clause.

sanitize_sql_for_order(["field(id, ?)", [1,3,2]])
# => "field(id, 1,3,2)"

sanitize_sql_for_order("id ASC")
# => "id ASC"
Show source
Register or log in to add new notes.