3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 23, 2018   (RSS)

By mizrahi - March 22, 2018

Any thoughts here? Please :)

By Dave - March 23, 2018

Hi mizrahi, 

What about this after getCategories: 

  // get child nums for selected record
  $childNumsByParentNum = [];
  foreach ($categoryRecords as $record) {
    $childNumsByParentNum[ $record['parentNum'] ][] = $record['num'];
  }
  $childNumsAsCSV = mysql_escapeCSV( $childNumsByParentNum[ $selectedCategory['num'] ]);

And then

'where' => " category IN ($childNumsAsCSV) ",

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com