1
0
mirror of synced 2025-01-31 12:32:59 +03:00

Making the correct usage of LIKE expressions and placeholders explicit

This commit is contained in:
Marco Pivetta 2012-01-29 15:59:45 +01:00
parent b0ec3dfb47
commit f9523aa419

View File

@ -317,7 +317,8 @@ Restricting a JOIN clause by additional conditions:
.. code-block:: php .. code-block:: php
<?php <?php
$query = $em->createQuery("SELECT u FROM CmsUser u LEFT JOIN u.articles a WITH a.topic LIKE '%foo%'"); $query = $em->createQuery("SELECT u FROM CmsUser u LEFT JOIN u.articles a WITH a.topic LIKE :foo");
$query->setParameter('foo', '%foo%');
$users = $query->getResult(); $users = $query->getResult();
Using several Fetch JOINs: Using several Fetch JOINs: