1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY sort_order ASC, display_val ASC' at line 4

SELECT langstrings.id AS val, langstrings.es AS display_val, langstrings.id_image AS id_image, parameters.type AS type, parameters.size AS size, parameters.sort_order AS sort_order FROM langstrings AS langstrings, parametersets_parameters AS parametersets_parameters, parameters AS parameters WHERE langstrings.id = parametersets_parameters.parameter AND parameters.parameter = parametersets_parameters.parameter AND parametersets_parameters.parameterset = ORDER BY sort_order ASC, display_val ASC