私はこのコードを使用しています
public function addTasks()
{
$stmt = $this->getEntityManager()
->getConnection()
->prepare('INSERT into newTasks (tasks_id, Profile_id)
SELECT task.id, 3 as Profile_id
FROM ptasks where ptasks.isActive = :mid');
$stmt ->setParameter('mid',1);
//$stmt->bindValue('foobar ', 1);
$stmt->execute();
return true;
}
今setParametr
、bindValue
物事は機能していません。しかし、私が置くだけisActive=1
で、それは動作します