Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
8b2ca0d4
Commit
8b2ca0d4
authored
Feb 11, 2010
by
beberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] DDC-325 - Fix Order of LOCATE to be LOCATE(needle, haystack [, offset])
parent
62712458
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
LocateFunction.php
lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php
+1
-1
QueryDqlFunctionTest.php
tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php
+1
-1
No files found.
lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php
View file @
8b2ca0d4
...
...
@@ -47,8 +47,8 @@ class LocateFunction extends FunctionNode
{
return
$sqlWalker
->
getConnection
()
->
getDatabasePlatform
()
->
getLocateExpression
(
$sqlWalker
->
walkStringPrimary
(
$this
->
secondStringPrimary
),
// its the other way around in platform
$sqlWalker
->
walkStringPrimary
(
$this
->
firstStringPrimary
),
$sqlWalker
->
walkStringPrimary
(
$this
->
secondStringPrimary
),
((
$this
->
simpleArithmeticExpression
)
?
$sqlWalker
->
walkSimpleArithmeticExpression
(
$this
->
simpleArithmeticExpression
)
:
false
...
...
tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php
View file @
8b2ca0d4
...
...
@@ -99,7 +99,7 @@ class QueryDqlFunctionTest extends \Doctrine\Tests\OrmFunctionalTestCase
public
function
testFunctionLocate
()
{
$dql
=
"SELECT m, LOCATE(
LOWER(m.name), 'e') AS loc, LOCATE(LOWER(m.name), 'e'
, 7) AS loc2 "
.
$dql
=
"SELECT m, LOCATE(
'e', LOWER(m.name)) AS loc, LOCATE('e', LOWER(m.name)
, 7) AS loc2 "
.
"FROM Doctrine\Tests\Models\Company\CompanyManager m"
;
$result
=
$this
->
_em
->
createQuery
(
$dql
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment