fix find a little bit
This commit is contained in:
parent
3a417440a5
commit
a3fabc87d2
|
@ -104,7 +104,7 @@ function wrap(db, dir) {
|
|||
if (i !== 0) {
|
||||
sql += 'AND ';
|
||||
}
|
||||
sql += db.escape(snakeCase(key)) + ' ' + db.escape(opts[key]);
|
||||
sql += db.escape(snakeCase(key)) + " = '" + db.escape(opts[key]) + "'";
|
||||
});
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue