Hi,
I don't think its quite that straightforward - but I could be wrong . I would try something like this:
my $usersdb = $DB->table('Users');
$usersdb->update ( { User_Has_Links => 'No' });
my $sth = $DB->table('Links')->select('DISTINCT(LinkOwner)');
while (my $user = $sth->fetchrow_array){
$usersdb->update ( {User_Has_Links => 'Yes' },{Username => $user});
}
I don't think its quite that straightforward - but I could be wrong . I would try something like this:
my $usersdb = $DB->table('Users');
$usersdb->update ( { User_Has_Links => 'No' });
my $sth = $DB->table('Links')->select('DISTINCT(LinkOwner)');
while (my $user = $sth->fetchrow_array){
$usersdb->update ( {User_Has_Links => 'Yes' },{Username => $user});
}