1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

解决 order by 问题

This commit is contained in:
2022-10-20 01:17:03 +08:00
parent dc80d8d527
commit 7ec08d1e55
3 changed files with 3 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ async function fetchAll({ args = {} }) {
].join(' AND ');
var sql = `
SELECT song_id FROM song WHERE ${whereClause} AND song_id NOT IN ( SELECT song_id FROM lyric )
${args.order ? `ORDER BY song_id ${args.order}` : ''}
${args.limit ? `LIMIT ${args.limit}` : ''}
`;
console.log(sql);