a guest Feb 20th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- SQLSTATE: Integrity constraint violation: 1062 Duplicate entry 'email@example.com' for key 'UNIQ_1483A5E9E7927C74'
- public function getSameFriends ($email)
- $q = $this->createQueryBuilder('f');
- ->where('f.email = :email')
- ->setParameter('email', $email);
- return $q->getQuery()->getSingleScalarResult();
- $em = $this->getDoctrine()->getEntityManager();
- $count = $em->getRepository('EMMyFriendsBundle:Friend')
- if($count != 0)
- $this->get('session')->setFlash('notice', 'There already is a friend with this email!');
- return $this->redirect($this->generateUrl('home_display'));
- No result was found for query although at least one row was expected.
- 500 Internal Server Error - NoResultException
- return count($q->getQuery()->getResult());
RAW Paste Data