1
0
mirror of synced 2024-12-14 23:26:04 +03:00

fixing codeblocks

This commit is contained in:
eXtreme 2010-07-07 19:10:48 +08:00 committed by Benjamin Eberlei
parent 80fd691880
commit 400be2a3e6

View File

@ -188,11 +188,12 @@ With Nested Conditions in WHERE Clause:
With COUNT DISTINCT: With COUNT DISTINCT:
[php] [php]
$query = $em->createQuery('SELECT COUNT(DISTINCT u.name) FROM CmsUser $query = $em->createQuery('SELECT COUNT(DISTINCT u.name) FROM CmsUser');
$users = $query->getResult(); // array of ForumUser objects $users = $query->getResult(); // array of ForumUser objects
With Arithmetic Expression in WHERE clause: With Arithmetic Expression in WHERE clause:
[php]
$query = $em->createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000'); $query = $em->createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000');
$users = $query->getResult(); // array of ForumUser objects $users = $query->getResult(); // array of ForumUser objects