Fix query as the order matters

* Note: When "Show blob and text fields as" option is set to "Links to download" the download won't work if the sorting is active
This commit is contained in:
Ilia Ross
2025-07-22 13:48:45 +03:00
parent 187b7c72a8
commit da5b814d2b

View File

@@ -19,7 +19,7 @@ $limitsql = &get_search_limit(\%in);
($sortsql, $sorthids, $sortargs) = &get_search_sort(\%in); ($sortsql, $sorthids, $sortargs) = &get_search_sort(\%in);
$d = &execute_sql($in{'db'}, $d = &execute_sql($in{'db'},
"select * from ".&quote_table($in{'table'})." $search $limitsql $sortsql"); "select * from ".&quote_table($in{'table'})." $search $sortsql $limitsql");
# Work out the MIME type based on the data # Work out the MIME type based on the data
$data = $d->{'data'}->[$in{'row'}]->[$in{'col'}]; $data = $d->{'data'}->[$in{'row'}]->[$in{'col'}];