Sort records based on dragSort of another table

4 posts by 3 authors in: Forums > CMS Builder
Last Post: April 20, 2011   (RSS)

Hi,

This might be tricky.

Table "tbl_courses" includes field "Discipline"

This Field "Discipline" is linked to table "tbl_disciplines", with 'num' recorded in the mySQL in tbl_courses.

So user creates new Course record, and selects the appropriate Discipline.


When listing the COURSES, and sorting by DISCIPLINE, it sorts then by NUM of the Discipline records.

However, how could we set the sort to sort by DISCIPLINE based on the dragSortOrder of the records in "tbl_discipline", rather than NUM?

I can only forsee a long winded messy hack type way of doing it... (which might only work in my head, not on paper) is there any efficient simple way?!

Thanks
Rob

Re: [rjbathgate] Sort records based on dragSort of another table

Hi Rob,

I did a search on sortby dragsortotrder and found some interesting posts, including this one:

http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=85670

Hope that offers some insights.

Good luck,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Sort records based on dragSort of another table

Hey,

Thanks for the thread Jerry.

Unless I'm missing something however it doesn't cover sorting one table of records based on the order of linked records in a second table, which is the issue I'm having.

Cheers
Rob