tags:

views:

31

answers:

1

I'm having a weird issue where I have 2 dbi handlers and they are interacting with each other in some non-obvious manner. Specifically, I set up 2 handlers, one for an insert, and one calling a stored proc, and if I call them like

$spHandler->execute($cusip);
$insertHandler->execute('2010-05-01', '36200A3C1', 595795,'X', 3);

Then the insert fails b/c of a precision error. If I just switch the order to

$insertHandler->execute('2010-05-01', '36200A3C1', 595795,'X', 3);
$spHandler->execute($cusip);

Then they both work correctly.

Are there shared resources here or something that I don't know about? I'd like to be able to do processing on the results of said stored proc, so the situation at the moment is problematic.

A: 

If you mean that you have two database handles to the same database, then that's bad and you need to stop that. If they are both statement handles, as the posters above say, we'd need to see the relevant code.

Zach Lipton
Obviously they are statement handles, since there is no `execute` method on database handles.
Kinopiko