fix find a little bit

This commit is contained in:
AJ ONeal 2015-09-21 20:51:08 -06:00
parent 3a417440a5
commit a3fabc87d2
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ function wrap(db, dir) {
if (i !== 0) { if (i !== 0) {
sql += 'AND '; sql += 'AND ';
} }
sql += db.escape(snakeCase(key)) + ' ' + db.escape(opts[key]); sql += db.escape(snakeCase(key)) + " = '" + db.escape(opts[key]) + "'";
}); });
if (params) { if (params) {
@ -116,7 +116,7 @@ function wrap(db, dir) {
} }
} }
return db.allAsync("SELECT * FROM " + tablename + " " + sql, []).then(simpleMap); return db.allAsync(sql, []).then(simpleMap);
}; };
DB.get = function (id) { DB.get = function (id) {