× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Bug order by on SQL field crashes admin list view

9 Jahre 5 Tage her #997 von Joris Ceelen
Bug order by on SQL field crashes admin list view wurde erstellt von Joris Ceelen
Hello and thanks for the good work,
I found a small bug where when you use an "SQL Field" as Field Type and your query includes an order by the admin list view produces the following error:

An error has occurred.

 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING id LIKE '24'' at line 1 SQL=select id,title from jml_categories where extension='com_form_nutrient_facts' and published=1 order by title HAVING id LIKE '24'

on query:
select id,title from jml_categories where extension='com_form_nutrient_facts' and published=1 order by title

the workaround I found is to encapsulate the query in a subquery:
select * from (select id,title from jml_categories where extension='com_form_nutrient_facts' and published=1 order by title) as t1.

note that the DB storage field is a text field, and amazingly I can just change it to INT directly in the database and everything seems to hold together, thanks!
best wishes Joris

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.064 Sekunden
Powered by Kunena Forum

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um Ihr Nutzererlebnis zu verbessern und Ihnen einen optimalen Service zu bieten. Wenn Sie die Website weiter nutzen, gehen wir davon aus, dass Sie mit unserer Cookie-Politik einverstanden sind.