We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

ERROR OFFSET. HELP ME!!

Why my offNext keep walking when it has been given the conditions? But offPrev conditions is work!!

  offPrev = vOffset - 10;
  if(offPrev <= 0){
      offPrev = 0;
  }       
  offNext = vOffset + 10;
  if(offNext < 10){
      offNext = 0;
  }
  range   = (vOffset + 1) + ' - ' + (vOffset + 10);

  sPrev = 'showListByNameFilter(' + offPrev + ')';
  sNext = 'showListByNameFilter(' + offNext + ')';

This is javascript, but with just that code you can not say much. Share more code or try using the console.log(varName) to check the content and debug your code

Good luck

what about phalcon ????