2009年9月17日星期四

[fw-db] Problem with creating multiple statements before executing

Having a strange problem here. When prepareing different statements before
executing them. Seems as though I can only have one prepared statement
active at a time. Is this correct?

The following fails for me.

$sql = "foo foo";
$stmtOne = $db->prepare($sql);
$sql = "bar bar";
$stmtTwo = $db->prepare($sql);

foreach($someIteratable)
{
$bindArrayOne = array(...);
$bindArrayTwo = array(...);
$stmtOne->execute($bindArrayOne);
$stmtTwo->execute($bindArrayTwo);
}

The first statement doesn't get executed but the second one does. Is MySQL
unable to handle more than one prepared statement at a time (looked in the
manual but didn't find anything) or is the problem somewhere else?


--
View this message in context: http://www.nabble.com/Problem-with-creating-multiple-statements-before-executing-tp25492052p25492052.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: