From 03840898ddaf333b0a4228f85a5855c20df6561d Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 30 Aug 2013 08:51:32 -0700 Subject: [PATCH] Supports ',' as the delimeter --- lib/mysql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mysql.js b/lib/mysql.js index 7fabe86..a57f6bb 100644 --- a/lib/mysql.js +++ b/lib/mysql.js @@ -339,7 +339,7 @@ function buildOrderBy(order) { order = [order]; } return 'ORDER BY ' + order.map(function(o) { - var t = o.split(/\s+/); + var t = o.split(/[\s,]+/); if (t.length === 1) return '`' + o + '`'; return '`' + t[0] + '` ' + t[1]; }).join(', ');