Skip to content

Instantly share code, notes, and snippets.

@clowestab
Created April 6, 2015 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clowestab/b94e4c1c48db42bf4b91 to your computer and use it in GitHub Desktop.
Save clowestab/b94e4c1c48db42bf4b91 to your computer and use it in GitHub Desktop.
Phalcon transaction issue
for ($i = 0; $i < 5; $i++) {
echo $i;
$transaction = $this->transactionManager->get();
$pub = new Pub();
$pub->setTransaction($transaction);
$pub->save();
$feature = new PubFeature();
$feature->setTransaction($transaction);
$feature->save();
$transaction->commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment