tomazos has asked for the wisdom of the Perl Monks concerning the following question:
I've been using items from %SESH as bind values all over the place for $dbh->selectrow_array's, seemingly with no problem.
I just went to use a %SESH item as a bind value for a $dbh->do(insert), and it ended up as a NULL in the database even though I was sure that it had a valid value.
After an hour of fuddling I tried setting it to a my $value = $SESH{'value'} and then using $value in the insert rather than the $SESH{'value'} on the insert.
It worked. There must be some kind of conflict with the locking mechanism, given that %SESH is tied to the same database handle that I am doing the insert on.
My question is, is this expected behaviour? That it will work only as a bind value for selects and not inserts? And it will silently fail? Or should I be avoiding using %SESH as a bind value in any database activity?
-Andrew.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Weird Apache::Session::MySQL and DBI conflict
by perrin (Chancellor) on Aug 08, 2005 at 13:46 UTC |