sitfrog
New Member
Hello all,
I am developing league scoring system with Fabrik and ran into a problem trying to sort lists when using the querystring in the URL and multiple columns. When I sort on one column, it works. When I try to sort using multiple columns, it gives me a 500 error. The SQL that is being dumped to the browser shows something interesting. The comma I used to delimit the two element names seems to be getting lost and the SQL statement in the ORDER BY clause concatenates the two elements into one non-existent element name.
This is my first post I'm not able to post links yet. I append these strings to my URL:
Works - ?&order_by=mdbteam_teamrecords___total_points_editable
Works - ?&order_by=mdbteam_teamrecords___wins_editable
Fails - ?&order_by=mdbteam_teamrecords___wins_editable,mdbteam_teamrecords___total_points_editable
The one that fails has this in the clause, the wins_editable element gets merged with the total_points_editable. I assume I am creating the URL incorrectly, I have tried all kinds of subtle variations but I get the same results:
ORDER BY `mdbteam_teamrecords`.`wins_editablemdbteam_teamrecords`.`total_points_editable` DESC,`mdbteam_teamrecords`.`wins_editable` DESC LIMIT 0, 30
Any ideas?
Matt
I am developing league scoring system with Fabrik and ran into a problem trying to sort lists when using the querystring in the URL and multiple columns. When I sort on one column, it works. When I try to sort using multiple columns, it gives me a 500 error. The SQL that is being dumped to the browser shows something interesting. The comma I used to delimit the two element names seems to be getting lost and the SQL statement in the ORDER BY clause concatenates the two elements into one non-existent element name.
This is my first post I'm not able to post links yet. I append these strings to my URL:
Works - ?&order_by=mdbteam_teamrecords___total_points_editable
Works - ?&order_by=mdbteam_teamrecords___wins_editable
Fails - ?&order_by=mdbteam_teamrecords___wins_editable,mdbteam_teamrecords___total_points_editable
The one that fails has this in the clause, the wins_editable element gets merged with the total_points_editable. I assume I am creating the URL incorrectly, I have tried all kinds of subtle variations but I get the same results:
ORDER BY `mdbteam_teamrecords`.`wins_editablemdbteam_teamrecords`.`total_points_editable` DESC,`mdbteam_teamrecords`.`wins_editable` DESC LIMIT 0, 30
Any ideas?
Matt