Hello all:
I am pretty new in this matter.
My code looks like this:
$sth2=$dbh->prepare("Select job.joid,
job_name,command,owner,machine,std_out_file,std_err_file,box_joid,timezone
from job, job2 where job.joid = job2.joid");
$sth2->execute;
while (my $info = $sth2->fetchrow_hasref)
{
calls a different subroutine to validate each argument like:
check_job_name($instance,$box_name,$info->{job_name},$info->{machine});
}
My question is... in my while loop am I quring the database every time when I
say $sth2-> fetchrow_hasref ? Is there any way I can call the fetchrow one
time and store it in a hash. When I did the perl -d:DProff -F ...I can see
that I called the fetch 2765 times does that mean that I access the database
2765 times.
I will be really greatful to your answers.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]