leftJoin

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 27, 2014   (RSS)

By Dave - November 27, 2014

Hi Zaba, 

Unfortunately, getPrevAndNextRecords() doesn't support the leftJoin option.

I can't think of a really simple solution at the moment that doesn't require some custom programming.  

Here's some quick hacks, maybe one of these will work? 

  • If there's not a lot of records (<100) you could just load them all and loop over them in PHP to determine what the next record should be
  • You could just load case_studies, sort it by sector.num and determine the next sector that way (they wouldn't be in alphabetic order, though).
  • You could just page through to sectors with no case studies, but with a link "No case studies, click here for the next section".
  • Or you could do the above with a PHP redirect, so when a section page loads and finds it case no case studies it just redirects to the next section page.  To the end-user this would happen so fast they probably wouldn't notice at all.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com