> 
> 
> On Thu, 19 Dec 2002, Michael A Chase wrote:
> 
> > The devil is often in the details.  A snippet from the 
> actual script 
> > that demonstrates the problem would make it much easier for 
> us to help 
> > figure it out.
> 
> Yeah I was trying to hold the bandwidth down but have just upped it 
> instead.
> 
> Here it is with all the cruft from trying to sort it out.  I 
> haven't included the connect stuff or the rest of the script 
> since I know it 
> works.

I don't see a "fetch" in the below code ... My recommended spot would be
below

> 
> ---===+++### Starts here ###+++===---
> 
> sub prt_domain_info {
> 
> ### Handle is global and works!
> #    my $dbh = shift;
> #    my $domain_qry = shift;
> 
>     my $domainname_key = shift;
> 
> ### Is the query not getting through?
>     my $domain_qry = "select * " .
>         "  from domain_info " .
>         " where tbl_key = ?";
> 
> ### Is the key not getting through?
> #    my $domain_qry = "select * " .
> #        "  from domain_info " .
> #        " where tbl_key = 88";
> 
> ### my-ing the column name variables inside or out of the sub 
> ### (global/local) doesn't matter.
> 
>     DBI->trace(4, '/tmp/damn88.log');
> 
>     my $sth = $dbh->prepare($domain_qry);
> 
>     $sth->execute($domainname_key);
> 
> #    $sth->bind_col(1, $domainname);
> 
>     $sth->bind_columns(\$domain_tbl_key, \$domainname, 
> \$domainisactive,
>                        \$hosting_co_code, \$username, \$password,
>                        \$frontpageext, \$inrodopi, 
> \$firstname, \$middle,
>                        \$lastname, \$phone, \$registrar, 
> \$regusername,
>                        \$regpassword, \$notes
>                        );
> 
> #    $sth->bind_columns(\($domain_tbl_key, $domainname, 
> $domainisactive,
> #                       $hosting_co_code, $username, $password,
> #                       $frontpageext, $inrodopi, $firstname, $middle,
> #                       $lastname, $phone, $registrar, $regusername,
> #                       $regpassword, $notes)
> #                      );
> 
>     &prt_page_top($domainname, 'found');
> 

        $sth->fetch;    # also returns undef if no rows, defined if
rows.
                
> ### Testing did I get a row back?
> 
>     print p($sth->rows);
> 
> ### When I un-comment this the print works???  But I don't 
> want the output
> #    my $dump = $sth->dump_results();
> 
>     print p($domain_tbl_key, $domainname, $domainisactive, 
>        $hosting_co_code, $\username, $password, 
> $frontpageext, $inrodopi,
>        $firstname, $middle, $lastname, $phone, $registrar, 
> $regusername,
>        $regpassword, $notes);
> 
>     &prt_page_bottom;
> 
> ### Should this be above?  Didn't seem to matter earlier.
> 
>     $sth->finish();
> 
> }
> 
> Wish I as a neater coder!
> 
> I don't think the table definition is going to help but I can 
> send it if so.
> 
> 
> Thanks for the offer to help,
> Rod
> -- 
>   "Open Source Software - Sometimes you get more than you paid for..."
> 
> 


Reply via email to