Try:
$DB->table('Category')->update({ haschildren => $has_children}, { ID => $category_id }
BTW: if you are going to do many selects, updates etc, with the same category, you can save yourself some writing if you define the table object $cat = $DB->table('Category'). Then you can just write $cat in place of $DB->table('Category')
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Code:
my $has_children = (has_children($category_id)) ? 'Yes' : 'No'; $DB->table('Category')->update({ haschildren => $has_children}, { ID => $category_id }
BTW: if you are going to do many selects, updates etc, with the same category, you can save yourself some writing if you define the table object $cat = $DB->table('Category'). Then you can just write $cat in place of $DB->table('Category')
Ivan
-----
Iyengar Yoga Resources / GT Plugins