Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Problem sorting by date in list view

Hi,

I've got a simple module containing two date related fields (one column has a DATE type and the other is a TIMESTAMP). In the list view with any or both of these columns showing, if I try to sort (order) any of these two columns, I get the spinning wheel and everything freezes. Sorting any other column works fine.

Any ideas?

Thank you!

Comments

  • I've found the source of the problem. It is not related to the column type. In fact, the crash occurs anytime I try to sort a column that has an alias containing a space (in my list_items function).

    For example, sorting de TEXTE column if...
    $this->db->select('id_act, act_titre as TITRE, act_texte as "TEXTE"...
    ...woks fine and sorting de TEXTE_TEST if...
    $this->db->select('id_act, act_titre as TITRE, act_texte as "TEXTE_TEST"...
    also works.

    However sorting TEXTE TEST if...
    $this->db->select('id_act, act_titre as TITRE, act_texte as "TEXTE TEST"...
    will fail (everything freezes), throwing an SQL syntax error.

    I can work around by not using any spaces in my aliases, but it might be something to look into.

Sign In or Register to comment.