Help for this page

Select Code to Download


  1. or download this
    my $prod_dbh = DBI->connect_cached('DBI:Sybase:database','web_','web')
    + || die "Couldn't connect to DB!\n" . DBI->errstr;
    my $parent_sth = $prod_dbh->prepare_cached('select * from table where 
    +id = ?');
    $parent_sth->bind_param(1,$id);
    $parent_sth->execute();
    my @parent_data = $parent_sth->fetchrow_array();
    
  2. or download this
    my $child_sth = $prod_dbh->prepare_cached('select * from table2 where 
    +id = ?');
    $child_sth->bind_param(1,$parent_data[0]);
    $child_sth->execute();
    my @child_data = $child_sth->fetchrow_array();
    print Dumper(@child_data);