Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [FrankM] SQL Commands in nph-build.cgi: Edit Log

Here is the list of edits for this post
Re: [FrankM] SQL Commands in nph-build.cgi
Hi,

I don't think its quite that straightforward - but I could be wrong Tongue. 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});
}

Last edited by:

afinlr: Nov 23, 2004, 6:50 AM

Edit Log: