0

我有两个查询,我一个接一个地执行。它们非常相似,但第一个有效,第二个无效。事实上,第二个永远不会返回,也不会抛出任何错误或异常。以下是相关代码:

$deleteChercheurProjetsQuery = $em->createQuery("DELETE FROM Entities\\ChercheurProjetRech P WHERE P.ProjetRechercheID IN (:existingProjetRechercheIds)")
    ->setParameter('existingProjetRechercheIds', $existingProjetRechercheIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);

$deleteProjetsQuery = $em->createQuery("DELETE FROM Entities\\ProjetRecherche P WHERE P.ID IN (:existingProjetRechercheIds)")
    ->setParameter('existingProjetRechercheIds', $existingProjetRechercheIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);

error_log("This message is logged");
$deleteChercheurProjetsQuery->getResult();
error_log("This message is also logged");
$deleteProjetsQuery->getResult();
error_log("This message is NOT logged");

我怎样才能找出问题所在?

4

1 回答 1

0

好的,问题出在其他地方。我将有问题的行包裹在一个try块中,发现此时 php 内存不足。

于 2013-08-01T16:23:01.680 回答