Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. my $sth = $dbh->prepare("SELECT cidc FROM catalog_chains WHERE pidc=?");
  2. my $rvs = $sth->execute($id) or die "execute: ".$sth->errstr."n";
  3. while (my $acr = $sth->fetchrow_array) {
  4.  
  5.  
  6. my $sth = $dbh->prepare("SELECT c.* FROM accer c, accer_links cl WHERE c.id=cl.cid AND cl.pid=1 ORDER BY cl.sort DESC");
  7. my $rvs = $sth->execute or die "execute: ".$sth->errstr."n";
  8. while (my $acc = $sth->fetchrow_hashref) {
  9.  
  10. $acc->{sel} = 1 if ($acc->{id} eq $acr);
  11. push(@accs, $acc);
  12.  
  13. }
  14.  
  15. $hash2->{accs} = @accs if @accs;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement