1
0
mirror of synced 2025-01-29 19:41:45 +03:00
This commit is contained in:
zYne 2007-08-01 19:12:39 +00:00
parent 75a1ead588
commit 6245287ef8

View File

@ -6,8 +6,17 @@ FROM <component_reference> [[LEFT | INNER] JOIN <component_reference>] ...
The {{FROM}} clause indicates the component or components from which to retrieve records. If you name more than one component, you are performing a join. For each table specified, you can optionally specify an alias.
* The default join type is {{LEFT JOIN}}. This join can be indicated by the use of either {{LEFT JOIN}} clause or simply '{{,}}', hence the following queries are equal:
Consider the following DQL query:
<code>
FROM User u
</code>
Here 'User' is the name of the class (component) and 'u' is the alias. You should always use short aliases, since most of the time those make the query much shorther and also because when using for example caching the cached form of the query takes less space when short aliases are being used.
The following example shows how to fetch all records from class 'User'.
<code type="php">
$users = Doctrine_Query::create()
->from('User u')
->execute();
</code>