diff --git a/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php b/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php
new file mode 100644
index 000000000..79a1e433e
--- /dev/null
+++ b/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php
@@ -0,0 +1,15 @@
+ ?';
+
+$rows = $this->conn->query($q, array(3));
+
+// the same query using the query interface
+
+$q = new Doctrine_Query();
+
+$rows = $q->update('Account')
+ ->where('id > ?')
+ ->execute(array(3));
+
+print $rows; // the number of affected rows
+?>
diff --git a/manual/codes/DQL (Doctrine Query Language) - UPDATE queries.php b/manual/codes/DQL (Doctrine Query Language) - UPDATE queries.php
new file mode 100644
index 000000000..0deaeff90
--- /dev/null
+++ b/manual/codes/DQL (Doctrine Query Language) - UPDATE queries.php
@@ -0,0 +1,16 @@
+ 200';
+
+$rows = $this->conn->query($q);
+
+// the same query using the query interface
+
+$q = new Doctrine_Query();
+
+$rows = $q->update('Account')
+ ->set('amount', 'amount + 200')
+ ->where('id > 200')
+ ->execute();
+
+print $rows; // the number of affected rows
+?>
diff --git a/manual/docs/DQL (Doctrine Query Language) - DELETE queries.php b/manual/docs/DQL (Doctrine Query Language) - DELETE queries.php
new file mode 100644
index 000000000..357dfd51f
--- /dev/null
+++ b/manual/docs/DQL (Doctrine Query Language) - DELETE queries.php
@@ -0,0 +1,20 @@
+
+
+DELETE FROM component_name
+ [WHERE where_condition]
+ [ORDER BY ...]
+ [LIMIT record_count]
+
+
+
+- The DELETE statement deletes records from component_name and returns the number of records deleted.
+
+
- The optional WHERE clause specifies the conditions that identify which records to delete.
+Without WHERE clause, all records are deleted.
+
+
- If the ORDER BY clause is specified, the records are deleted in the order that is specified.
+
+
- The LIMIT clause places a limit on the number of rows that can be deleted.
+The statement will stop as soon as it has deleted record_count records.
+
+
diff --git a/manual/docs/DQL (Doctrine Query Language) - Introduction.php b/manual/docs/DQL (Doctrine Query Language) - Introduction.php
index faa29ca83..c45e19ff6 100644
--- a/manual/docs/DQL (Doctrine Query Language) - Introduction.php
+++ b/manual/docs/DQL (Doctrine Query Language) - Introduction.php
@@ -9,39 +9,15 @@ When compared to using raw SQL, DQL has several benefits:
DQL understands relations so you don't have to type manually sql joins and join conditions
+ - DQL is portable on different databases
+
+
- DQL has some very complex built-in algorithms like (the record limit algorithm) which can help
developer to efficiently retrieve objects
- - It supports some many functions that help dealing with one-to-many, many-to-many relational data with conditional fetching.
+
- It supports some functions that can save time when dealing with one-to-many, many-to-many relational data with conditional fetching.
If the power of DQL isn't enough, you should consider using the rawSql API for object population.
-Standard DQL query consists of the following parts:
-
- - a FROM clause, which provides declarations that designate the domain to which the expressions
-specified in the other clauses of the query apply.
-
-
- - an optional WHERE clause, which may be used to restrict the results that are returned by the
-query.
-
-
- - an optional GROUP BY clause, which allows query results to be aggregated in terms of
-groups.
-
-
- - an optional HAVING clause, which allows filtering over aggregated groups.
-
-
- - an optional ORDER BY clause, which may be used to order the results that are returned by the
-query.
-
-
-In BNF syntax, a select statement is defined as:
- select_statement :: = select_clause from_clause [where_clause] [groupby_clause]
- [having_clause] [orderby_clause]
-
-A select statement must always have a SELECT and a FROM clause. The square brackets [] indicate
-that the other clauses are optional.
diff --git a/manual/docs/DQL (Doctrine Query Language) - UPDATE queries.php b/manual/docs/DQL (Doctrine Query Language) - UPDATE queries.php
new file mode 100644
index 000000000..ab308d48c
--- /dev/null
+++ b/manual/docs/DQL (Doctrine Query Language) - UPDATE queries.php
@@ -0,0 +1,24 @@
+UPDATE statement syntax:
+
+
+UPDATE component_name
+ SET col_name1=expr1 [, col_name2=expr2 ...]
+ [WHERE where_condition]
+ [ORDER BY ...]
+ [LIMIT record_count]
+
+
+
+- The UPDATE statement updates columns of existing records in component_name with new values and returns the number of affected records.
+
+
- The SET clause indicates which columns to modify and the values they should be given.
+
+
- The optional WHERE clause specifies the conditions that identify which records to update.
+Without WHERE clause, all records are updated.
+
+
- The optional ORDER BY clause specifies the order in which the records are being updated.
+
+
- The LIMIT clause places a limit on the number of records that can be updated. You can use LIMIT row_count to restrict the scope of the UPDATE.
+A LIMIT clause is a rows-matched restriction not a rows-changed restriction.
+The statement stops as soon as it has found record_count rows that satisfy the WHERE clause, whether or not they actually were changed.
+
diff --git a/manual/documentation.php b/manual/documentation.php
index e80341b78..e7164f9e8 100644
--- a/manual/documentation.php
+++ b/manual/documentation.php
@@ -304,9 +304,14 @@ $menu = array("Getting started" =>
"OffsetIterator")
*/
),
+
"DQL (Doctrine Query Language)" =>
- array('Introduction',
+ array(
+ 'Introduction',
+ 'SELECT queries',
+ 'UPDATE queries',
+ 'DELETE queries',
'FROM clause',
'WHERE clause',
'Conditional expressions' =>
@@ -323,7 +328,7 @@ $menu = array("Getting started" =>
'Empty Collection Comparison Expressions',
'Collection Member Expressions',
'Exists Expressions',
- 'All or Any Expressions',
+ 'All and Any Expressions',
'Subqueries'),
'Functional Expressions' =>
array('String functions',
@@ -336,16 +341,6 @@ $menu = array("Getting started" =>
'LIMIT and OFFSET clauses',
'Examples',
'BNF'),
- /**
- 'Functions' => array(
- 'Contains',
- 'Regexp',
- 'Like'),
- 'Operators' => array(
- 'Logical operators')
-
-
- */
"Transactions" => array(
"Introduction",