static search for sql

This commit is contained in:
jasonchenwork 2025-04-11 17:16:59 +08:00
parent 7c6d639c94
commit f0e176ee6a
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ namespace DualScreenDemo
int songLimit = ReadHotSongLimit();
string query = $"SELECT * FROM SongLibrary WHERE `語別` = '{category}' ORDER BY `點播次數` DESC LIMIT {songLimit}";
var selectedSongs = PrimaryForm.Instance.SearchSongs_Mysql(query);
var selectedSongs = SearchSongs_Mysql(query);
/*var selectedSongs = allSongs.Where(song => song.Category == category)
.OrderByDescending(song => song.Plays)
.Take(songLimit)

View File

@ -10,7 +10,7 @@ namespace DualScreenDemo
int songLimit = ReadHotSongLimit();
string query = $"SELECT * FROM SongLibrary WHERE `語別` = '台語' ORDER BY `新增日期` DESC LIMIT {songLimit}";
var selectedSongs = PrimaryForm.Instance.SearchSongs_Mysql(query);
var selectedSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = selectedSongs;