From d83c193b1afc3f239878ecf3589e87b0ec0c4f0e Mon Sep 17 00:00:00 2001 From: zYne Date: Tue, 10 Oct 2006 17:33:26 +0000 Subject: [PATCH] DQL: docs for IN expressions --- ...nditional expressions - In expressions.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 manual/docs/DQL (Doctrine Query Language) - Conditional expressions - In expressions.php diff --git a/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - In expressions.php b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - In expressions.php new file mode 100644 index 000000000..040c28d9d --- /dev/null +++ b/manual/docs/DQL (Doctrine Query Language) - Conditional expressions - In expressions.php @@ -0,0 +1,26 @@ +Syntax: +
+
+operand IN (subquery|valuelist)
+
+
+An IN conditional expression returns true if the operand is found from result of the subquery +or if its in the specificied comma separated valuelist, hence the IN expression is always false if the result of the subquery +is empty. + +
+
+FROM C1 WHERE C1.col1 IN (FROM C2(col1));
+
+FROM User WHERE User.id IN (1,3,4,5)
+
+
+ +The keyword IN is an alias for = ANY. Thus, these two statements are equal: +
+
+FROM C1 WHERE C1.col1 = ANY (FROM C2(col1));
+FROM C1 WHERE C1.col1 IN    (FROM C2(col1));
+
+
+