MDL-75170 tablelib: Use sql_order_by_null to sort columns

This commit is contained in:
Alex Morris
2022-09-30 11:29:27 +13:00
parent 70dfee9e23
commit fee755bbfa

View File

@@ -601,9 +601,9 @@ class flexible_table {
$column = $DB->sql_order_by_text($column); $column = $DB->sql_order_by_text($column);
} }
if ($order == SORT_ASC) { if ($order == SORT_ASC) {
$bits[] = $column . ' ASC'; $bits[] = $DB->sql_order_by_null($column);
} else { } else {
$bits[] = $column . ' DESC'; $bits[] = $DB->sql_order_by_null($column, SORT_DESC);
} }
} }