Home : General : Databases and SQL :

General: Databases and SQL: Re: [yogi] Update records in a table based on a function: Edit Log

Here is the list of edits for this post
Re: [yogi] Update records in a table based on a function
Hi Ivan,


Here is what I have:

Code:

$my category_id;
print "Updating...";
my $has_children = (has_children($category_id)) ? 'Yes' : 'No';
$DB->table('Category')->update({ haschildren => $has_children}, { ID => $category_id });
print "done.<br>";

#determine if the category has children
sub has_children { $DB->table('Category')->count( { FatherID => $_[0] } ) }


I added a ); to the end of the $DB-> statement. Must have got chopped off.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

sooke: May 16, 2002, 10:01 AM

Edit Log: