mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge pull request #15610 from uberbrady/fix_numeric_sort_bug
Fix numeric sort 'ambiguous order clause' error
This commit is contained in:
commit
3699d79363
|
@ -395,7 +395,7 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
// This may not work for all databases, but it works for MySQL
|
// This may not work for all databases, but it works for MySQL
|
||||||
if ($numeric_sort) {
|
if ($numeric_sort) {
|
||||||
$assets->orderByRaw($sort_override . ' * 1 ' . $order);
|
$assets->orderByRaw(DB::getTablePrefix() . 'assets.' . $sort_override . ' * 1 ' . $order);
|
||||||
} else {
|
} else {
|
||||||
$assets->orderBy($sort_override, $order);
|
$assets->orderBy($sort_override, $order);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue