in reply to Re: Can't call method "prepare" on an undefined value
in thread Can't call method "prepare" on an undefined value
I've played around with "strict" and "my", and funny enough, it doesn't fix the problem. I have found something else now... If I do not use procedures, ie. I do my mySQL connection, executing the SQL statement and disconnecting it all in one piece of code, it works fine, however, I'm using procedures to do that. I have a connection procedure, a disconnection procedure, and a SQL execution procedure. It looks like my $mwsdbh variable I receive from my connection is not a global variable, although it should be. When it comes to the execution of SQL statement procedure, the script dies.
Have you guys seen this behaviour before? I've tried "returning" the variable, but that doesn't work.
Thanks!
#!/massyn.pl The more I learn, the more I realize I don't know. Albert Einstein 1879-1955
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Can't call method "prepare" on an undefined value
by CountZero (Bishop) on Dec 18, 2002 at 10:41 UTC | |
by Massyn (Hermit) on Dec 19, 2002 at 00:26 UTC | |
by CountZero (Bishop) on Dec 19, 2002 at 19:37 UTC |