1
0
mirror of synced 2025-01-09 18:47:10 +03:00

Merge pull request #1161 from gammamatrix/patch-1

Fixing error with from() parameters in example
This commit is contained in:
Marco Pivetta 2014-10-14 13:18:27 +02:00
commit 35d4405727

View File

@ -216,7 +216,7 @@ allowed. Binding parameters can simply be achieved as follows:
// $qb instanceof QueryBuilder
$qb->select('u')
->from('User u')
->from('User', 'u')
->where('u.id = ?1')
->orderBy('u.name', 'ASC')
->setParameter(1, 100); // Sets ?1 to 100, and thus we will fetch a user with u.id = 100
@ -230,7 +230,7 @@ alternative syntax is available:
// $qb instanceof QueryBuilder
$qb->select('u')
->from('User u')
->from('User', 'u')
->where('u.id = :identifier')
->orderBy('u.name', 'ASC')
->setParameter('identifier', 100); // Sets :identifier to 100, and thus we will fetch a user with u.id = 100