jan-vince / smallrecords

OctoberCMS plugin to store and manage records and lists
MIT License
31 stars 11 forks source link

Sorting on Images #76

Open zlobec opened 3 years ago

zlobec commented 3 years ago

When Images are added as a column in List setup, sorting returns an error when clicked on the Images column to sort:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'images' in 'order clause' (SQL: selectjanvince_smallrecords_records.*, name asname, (select group_concat(name separator ', ') fromjanvince_smallrecords_categoriesinner joinjanvince_smallrecords_records_categoriesonjanvince_smallrecords_categories.id=janvince_smallrecords_records_categories.category_idwherejanvince_smallrecords_records.id=janvince_smallrecords_records_categories.record_id) ascategoriesfromjanvince_smallrecords_recordswherearea_id= 4 order byimagesdesc limit 20 offset 20)

I didn't have more time to go deeper.

jan-vince commented 3 years ago

Looks like specific for MySQL as with SQLite sorting is OK.

I will look over this when I have some time.