I have a query like this:
SELECT * FROM blah1 WHERE blah2 ORDERBY %s
where I replace the string (sanitized!) for %s. The problem is that the string may be empty. How to insert no-op there if the line is empty, instead of changing the rest of the query?
source
share