Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update too.

  • Loading branch information...
commit b7103ac9e9448acd612d04409785c1b91c80d6ba 1 parent a62521f
@jhannah authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  Shamanoid/doit.pl
View
2  Shamanoid/doit.pl
@@ -6,6 +6,7 @@
my $dbh = DBI->connect(...);
my $sth1 = $dbh->prepare("select * from [urls]");
my $sth2 = $dbh->prepare("select * from [orgs] where url = ?");
+my $sth3 = $dbh->prepare("update [urls] set org_id = ?");
$sth1->execute;
while (my $row1 = $sth1->fetchrow_hashref) {
if ($row1->{url}}) {
@@ -13,6 +14,7 @@
$sth2->execute($row1->{url});
while (my $row2 = $sth2->fetchrow_hashref) {
say " found a match on orgs row " . $row2->{id};
+ $sth3->execute($row2->{id});
# ...
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.