> You want
> 
>         my ($histtype, $dsc, $contactid, $usrid, $dbh) = @_;
> 
> here.

Ok, I'll make this change.  Could the way I had this cause the
variables to be shared across different calls to this sub?

> >         my $sth = $dbh->prepare($sql_inserthistory) or die "Couldn't
> > prepare statement: " . $dbh->errstr;
> 
> For efficiency reasons, you should prepare that statement just once, and
> reuse it.  Possibly make it a global variable and init it in one of the
> OnStart event handlers.

I agree, but with the weird cross-over issue that I am having, I tried
to get rid of everything global until I figured this out.
 
> I don't see anywhere that you're using the $SessionID.

Calls to this sub are made like so:
history(1, "Test History", $Session->{contactid}, $Session->{usrid}, $dbh);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to