Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: passing $dbh around
Date: Jun 10 1999 9:22PM
David Hajoglou writes:
> To all knowing list,
> We have decided against persistant database handles (after all of my toil
> with them). So, I have a question:
> What is the best way to pass a database handle around to different
> modules? Or reference the same one across functions? i.e.
> $var = &itel::itel_lib::somefunc($dbh);
> is there a way to make a pointer to the original handle? If this is
> documented somewhere then just point me there.
The way you're doing it in the snippet above is just fine. A database
handle is just a normal scalar, so you can pass it around as much as
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: firstname.lastname@example.org