Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: DBI and last_insert_id

by cog (Parson)
on Jan 29, 2009 at 11:24 UTC ( #739862=note: print w/replies, xml ) Need Help??


in reply to Re: DBI and last_insert_id
in thread DBI and last_insert_id

I wish that would be the problem, but unfortunately it isn't. There are indeed four placeholders and I'm passing three to execute, but that's just because I edited the code to post it here and missed that. The number of arguments I'm passing in the actual code is correct.

I also have RaiseError active. The INSERT statement definitely works, as later on I can see the row is in the database. It's just that the entry I'm inserting in the other table using the last_insert_id() has the wrong id.

Replies are listed 'Best First'.
Re^3: DBI and last_insert_id
by moritz (Cardinal) on Jan 29, 2009 at 12:31 UTC
    In future, please test that the code you post here does exhibit the same behaviour as you describe.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://739862]
help
Chatterbox?
[Corion]: Yay, vacation time now - one week off work (but a Perl workshop in the middle ;)) )
[talexb]: TStanley I just realized that I was in your area for a convention back in April. We were at the high school for the weekend, the one with the long driveway. Nice spot.
[TStanley]: I am heading to Arlington, Virginia next week, then I get to spend an entire week at home. Looking forward to that as I will have spent 7 weeks on the road by the end of next week
[talexb]: That's a long road trip. I haven't travelled for business in years.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-06-23 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (548 votes). Check out past polls.