Merge pull request #723 from morganprecision/patch-1
Remove extra semicolon before ->setParameter() calls
This commit is contained in:
commit
2a5652c807
@ -208,7 +208,7 @@ allowed. Binding parameters can simply be achieved as follows:
|
|||||||
$qb->select('u')
|
$qb->select('u')
|
||||||
->from('User u')
|
->from('User u')
|
||||||
->where('u.id = ?1')
|
->where('u.id = ?1')
|
||||||
->orderBy('u.name', 'ASC');
|
->orderBy('u.name', 'ASC')
|
||||||
->setParameter(1, 100); // Sets ?1 to 100, and thus we will fetch a user with u.id = 100
|
->setParameter(1, 100); // Sets ?1 to 100, and thus we will fetch a user with u.id = 100
|
||||||
|
|
||||||
You are not forced to enumerate your placeholders as the
|
You are not forced to enumerate your placeholders as the
|
||||||
@ -222,7 +222,7 @@ alternative syntax is available:
|
|||||||
$qb->select('u')
|
$qb->select('u')
|
||||||
->from('User u')
|
->from('User u')
|
||||||
->where('u.id = :identifier')
|
->where('u.id = :identifier')
|
||||||
->orderBy('u.name', 'ASC');
|
->orderBy('u.name', 'ASC')
|
||||||
->setParameter('identifier', 100); // Sets :identifier to 100, and thus we will fetch a user with u.id = 100
|
->setParameter('identifier', 100); // Sets :identifier to 100, and thus we will fetch a user with u.id = 100
|
||||||
|
|
||||||
Note that numeric placeholders start with a ? followed by a number
|
Note that numeric placeholders start with a ? followed by a number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user