I have a table named Images that contains a list of logos. I would like to retrieve only logos of airlines companies.
I have this error:
An exception has been thrown during the rendering of a template ("Invalid parameter number: number of bound variables does not match number of tokens")
->add('logo', 'genemu_jqueryselect2_entity', array(
'class' => 'FLYBookingsBundle:Images',
'property' => 'alt',
'placeholder' => 'Choose your company',
'query_builder' => function(EntityRepository $er) {
return $er->createQueryBuilder('u')
->where('u.transport_mode = :AIRPLANE')
->groupBy('u.id')
->orderBy('u.alt', 'ASC');
},))
+---+----------------------------+-------------+-----------------+
|id | path | alt |tranport_mode |
+---+----------------------------+-------------+-----------------+
| 1 | /symfony/web/etihad.jpg | etihad |AIRPLANE |
| 2 | /symfony/web/singapore.jpg | singapore |AIRPLANE |
| 3 | /symfony/web/InterCape.jpg | InterCape |BUS |
+---+----------------------------+-------------+-----------------+