| @@ 524-559 (lines=36) @@ | ||
| 521 | return $header; |
|
| 522 | } |
|
| 523 | ||
| 524 | public function getEntriesQuery($game) |
|
| 525 | { |
|
| 526 | $em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default'); |
|
| 527 | ||
| 528 | $qb = $em->createQueryBuilder(); |
|
| 529 | $qb->select(' |
|
| 530 | r.id, |
|
| 531 | u.username, |
|
| 532 | u.title, |
|
| 533 | u.firstname, |
|
| 534 | u.lastname, |
|
| 535 | u.email, |
|
| 536 | u.optin, |
|
| 537 | u.optinPartner, |
|
| 538 | u.address, |
|
| 539 | u.address2, |
|
| 540 | u.postalCode, |
|
| 541 | u.city, |
|
| 542 | u.telephone, |
|
| 543 | u.mobile, |
|
| 544 | u.created_at, |
|
| 545 | u.dob, |
|
| 546 | e.winner, |
|
| 547 | e.socialShares, |
|
| 548 | e.playerData, |
|
| 549 | e.updated_at, |
|
| 550 | r.totalCorrectAnswers |
|
| 551 | ') |
|
| 552 | ->from('PlaygroundGame\Entity\QuizReply', 'r') |
|
| 553 | ->innerJoin('r.entry', 'e') |
|
| 554 | ->leftJoin('e.user', 'u') |
|
| 555 | ->where($qb->expr()->eq('e.game', ':game')); |
|
| 556 | ||
| 557 | $qb->setParameter('game', $game); |
|
| 558 | ||
| 559 | return $qb->getQuery(); |
|
| 560 | } |
|
| 561 | ||
| 562 | public function getGameEntity() |
|
| @@ 511-547 (lines=37) @@ | ||
| 508 | return $header; |
|
| 509 | } |
|
| 510 | ||
| 511 | public function getEntriesQuery($game) |
|
| 512 | { |
|
| 513 | $em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default'); |
|
| 514 | ||
| 515 | $qb = $em->createQueryBuilder(); |
|
| 516 | $qb->select(' |
|
| 517 | p.id, |
|
| 518 | u.username, |
|
| 519 | u.title, |
|
| 520 | u.firstname, |
|
| 521 | u.lastname, |
|
| 522 | u.email, |
|
| 523 | u.optin, |
|
| 524 | u.optinPartner, |
|
| 525 | u.address, |
|
| 526 | u.address2, |
|
| 527 | u.postalCode, |
|
| 528 | u.city, |
|
| 529 | u.telephone, |
|
| 530 | u.mobile, |
|
| 531 | u.created_at, |
|
| 532 | u.dob, |
|
| 533 | e.winner, |
|
| 534 | e.socialShares, |
|
| 535 | e.playerData, |
|
| 536 | e.updated_at, |
|
| 537 | p.status, |
|
| 538 | p |
|
| 539 | ') |
|
| 540 | ->from('PlaygroundGame\Entity\PostVotePost', 'p') |
|
| 541 | ->innerJoin('p.entry', 'e') |
|
| 542 | ->leftJoin('p.user', 'u') |
|
| 543 | ->where($qb->expr()->eq('e.game', ':game')); |
|
| 544 | ||
| 545 | $qb->setParameter('game', $game); |
|
| 546 | ||
| 547 | return $qb->getQuery(); |
|
| 548 | } |
|
| 549 | ||
| 550 | /** |
|
| @@ 425-458 (lines=34) @@ | ||
| 422 | return $games; |
|
| 423 | } |
|
| 424 | ||
| 425 | public function getEntriesQuery($game) |
|
| 426 | { |
|
| 427 | $em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default'); |
|
| 428 | ||
| 429 | $qb = $em->createQueryBuilder(); |
|
| 430 | $qb->select(' |
|
| 431 | e.id, |
|
| 432 | u.username, |
|
| 433 | u.title, |
|
| 434 | u.firstname, |
|
| 435 | u.lastname, |
|
| 436 | u.email, |
|
| 437 | u.optin, |
|
| 438 | u.optinPartner, |
|
| 439 | u.address, |
|
| 440 | u.address2, |
|
| 441 | u.postalCode, |
|
| 442 | u.city, |
|
| 443 | u.telephone, |
|
| 444 | u.mobile, |
|
| 445 | u.created_at, |
|
| 446 | u.dob, |
|
| 447 | e.winner, |
|
| 448 | e.socialShares, |
|
| 449 | e.playerData, |
|
| 450 | e.updated_at |
|
| 451 | ') |
|
| 452 | ->from('PlaygroundGame\Entity\Entry', 'e') |
|
| 453 | ->leftJoin('e.user', 'u') |
|
| 454 | ->where($qb->expr()->eq('e.game', ':game')); |
|
| 455 | ||
| 456 | $qb->setParameter('game', $game); |
|
| 457 | ||
| 458 | return $qb->getQuery(); |
|
| 459 | } |
|
| 460 | ||
| 461 | public function getEntriesHeader($game) |
|