From 1940ee7be8d403a66a87bed5fbd836be95a7b37b Mon Sep 17 00:00:00 2001 From: Dan Fabulich Date: Sun, 9 Feb 2025 09:32:06 -0800 Subject: [PATCH] Fix sorting `willplay:yes` by playtime Fixes #1279 --- www/searchutil.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/searchutil.php b/www/searchutil.php index 73f9bcb1..e5f6777c 100644 --- a/www/searchutil.php +++ b/www/searchutil.php @@ -656,7 +656,7 @@ function doSearch($db, $term, $searchType, $sortby, $limit, $browse, $count_all_ } $not = (preg_match("/^y.*/i", $txt) ? "" : "not"); - $expr = "gameid $not in (select gameid from playedgames where userid = '$curuser')"; + $expr = "games.id $not in (select gameid from playedgames where userid = '$curuser')"; break; case 'willplay': @@ -666,7 +666,7 @@ function doSearch($db, $term, $searchType, $sortby, $limit, $browse, $count_all_ } $not = (preg_match("/^y.*/i", $txt) ? "" : "not"); - $expr = "gameid $not in (select gameid from wishlists where userid = '$curuser')"; + $expr = "games.id $not in (select gameid from wishlists where userid = '$curuser')"; break; case 'wontplay': @@ -676,7 +676,7 @@ function doSearch($db, $term, $searchType, $sortby, $limit, $browse, $count_all_ } $not = (preg_match("/^y.*/i", $txt) ? "" : "not"); - $expr = "gameid $not in (select gameid from unwishlists where userid = '$curuser')"; + $expr = "games.id $not in (select gameid from unwishlists where userid = '$curuser')"; break; @@ -687,7 +687,7 @@ function doSearch($db, $term, $searchType, $sortby, $limit, $browse, $count_all_ } $not = (preg_match("/^y.*/i", $txt) ? "" : "not"); - $expr = "gameid $not in (select gameid from reviews where review is not null and userid = '$curuser')"; + $expr = "games.id $not in (select gameid from reviews where review is not null and userid = '$curuser')"; break; case 'rated': @@ -697,7 +697,7 @@ function doSearch($db, $term, $searchType, $sortby, $limit, $browse, $count_all_ } $not = (preg_match("/^y.*/i", $txt) ? "" : "not"); - $expr = "gameid $not in (select gameid from reviews where rating is not null and userid = '$curuser')"; + $expr = "games.id $not in (select gameid from reviews where rating is not null and userid = '$curuser')"; break; case 'author':