Moved the MIN(smiley_order) to the SELECT column list now, so it can be used for sorting on MySQL 4, but also still works on MSSQL, which the bug was originally about.