A
A
Alexander Vladimirovich2017-05-12 09:25:39
Doctrine ORM
Alexander Vladimirovich, 2017-05-12 09:25:39

Why is there an error in query builder?

I study little by little, I do from an example and I can’t understand why the error?
docs.doctrine-project.org/projects/doctrine-orm/en...

$qb->select('id')
    ->from('crm.list_queue', 't')
    ->where('t.id = ?1')
    ->orderBy('t.title', 'ASC')
    ->setParameter(1, 1)
;

Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
option with ->where('u.id = :identifier') works, but since I'm doing it for educational purposes, I want to understand the issue

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question