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
071d5425
Commit
071d5425
authored
Nov 10, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #580
parent
6b03c4c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Abstract.php
lib/Doctrine/Query/Abstract.php
+5
-4
No files found.
lib/Doctrine/Query/Abstract.php
View file @
071d5425
...
@@ -78,11 +78,12 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
...
@@ -78,11 +78,12 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
* whereIn
* whereIn
* adds IN condition to the query WHERE part
* adds IN condition to the query WHERE part
*
*
* @param string $expr
* @param string $expr
the operand of the IN
* @param mixed $params an array of parameters or a simple scalar
* @param mixed $params an array of parameters or a simple scalar
* @param boolean $not whether or not to use NOT in front of IN
* @return Doctrine_Query
* @return Doctrine_Query
*/
*/
public
function
whereIn
(
$expr
,
$params
=
array
())
public
function
whereIn
(
$expr
,
$params
=
array
()
,
$not
=
false
)
{
{
$params
=
(
array
)
$params
;
$params
=
(
array
)
$params
;
$a
=
array
();
$a
=
array
();
...
@@ -98,7 +99,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
...
@@ -98,7 +99,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
$this
->
_params
[
'where'
]
=
array_merge
(
$this
->
_params
[
'where'
],
$params
);
$this
->
_params
[
'where'
]
=
array_merge
(
$this
->
_params
[
'where'
],
$params
);
$where
=
$expr
.
' IN ('
.
implode
(
', '
,
$a
)
.
')'
;
$where
=
$expr
.
(
$not
===
true
?
' NOT '
:
''
)
.
' IN ('
.
implode
(
', '
,
$a
)
.
')'
;
return
$this
->
parseQueryPart
(
'where'
,
$where
,
true
);
return
$this
->
parseQueryPart
(
'where'
,
$where
,
true
);
}
}
...
@@ -374,4 +375,4 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
...
@@ -374,4 +375,4 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate
* @return Doctrine_Query this object
* @return Doctrine_Query this object
*/
*/
abstract
public
function
parseQueryPart
(
$queryPartName
,
$queryPart
,
$append
=
false
);
abstract
public
function
parseQueryPart
(
$queryPartName
,
$queryPart
,
$append
=
false
);
}
}
\ No newline at end of file
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