Câu hỏi được gắn thẻ «query-builder»

13
Cách sử dụng WHERE IN với Học thuyết 2
Tôi có mã sau đây cho tôi lỗi: Message: Invalid parameter number: number of bound variables does not match number of tokens Mã số: public function getCount($ids, $outcome) { if (!is_array($ids)) { $ids = array($ids); } $qb = $this->getEntityManager()->createQueryBuilder(); $qb->add('select', $qb->expr()->count('r.id')) ->add('from', '\My\Entity\Rating r'); if ($outcome === 'wins') { $qb->add('where', …

Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.