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
487e07ae
Commit
487e07ae
authored
Sep 29, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added DQL introduction
parent
1ff90159
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
1 deletion
+52
-1
DQL (Doctrine Query Language) - Introduction.php
...al/codes/DQL (Doctrine Query Language) - Introduction.php
+26
-0
DQL (Doctrine Query Language) - Introduction.php
manual/docs/DQL (Doctrine Query Language) - Introduction.php
+19
-0
documentation.php
manual/documentation.php
+4
-1
basic.css
manual/styles/basic.css
+3
-0
No files found.
manual/codes/DQL (Doctrine Query Language) - Introduction.php
0 → 100644
View file @
487e07ae
<?php
// DO NOT USE THE FOLLOWING CODE
// (using many sql queries for object population):
$users
=
$conn
->
getTable
(
'User'
)
->
findAll
();
foreach
(
$users
as
$user
)
{
print
$user
->
name
.
"<br \>"
;
foreach
(
$user
->
Phonenumber
as
$phonenumber
)
{
print
$phonenumber
.
"<br \>"
;
}
}
// same thing implemented much more efficiently:
// (using only one sql query for object population)
$users
=
$conn
->
query
(
"FROM User.Phonenumber"
);
foreach
(
$users
as
$user
)
{
print
$user
->
name
.
"<br \>"
;
foreach
(
$user
->
Phonenumber
as
$phonenumber
)
{
print
$phonenumber
.
"<br \>"
;
}
}
?>
manual/docs/DQL (Doctrine Query Language) - Introduction.php
0 → 100644
View file @
487e07ae
Doctrine
Query
Language
(
DQL
)
is
an
Object
Query
Language
created
for
helping
users
in
complex
object
retrieval
.
You
should
always
consider
using
DQL
(
or
raw
SQL
)
when
retrieving
relational
data
efficiently
(
eg
.
when
fetching
users
and
their
phonenumbers
)
.
<
br
\
><
br
\
>
When
compared
to
using
raw
SQL
,
DQL
has
several
benefits
:
<
br
\
>
<
ul
>
<
li
\
>
From
the
start
it
has
been
designed
to
retrieve
records
(
objects
)
not
result
set
rows
</
ul
>
<
ul
>
<
li
\
>
DQL
understands
relations
so
you
don
't have to type manually sql joins and join conditions
</ul>
<ul>
<li \>DQL has some very complex built-in algorithms like (the record limit algorithm) which can help
developer to efficiently retrieve objects
</ul>
<ul>
<li \>It supports some many functions that help dealing with one-to-many, many-to-many relational data with conditional fetching.
</ul>
If the power of DQL isn'
t
enough
,
you
should
consider
using
the
rawSql
API
for
object
population
.
manual/documentation.php
View file @
487e07ae
...
...
@@ -298,7 +298,10 @@ $menu = array("Getting started" =>
*/
),
"DQL (Doctrine Query Language)"
=>
array
(
'Syntax'
=>
array
(
'Introduction'
,
'Syntax'
=>
array
(
'FROM'
,
'WHERE'
,
...
...
manual/styles/basic.css
View file @
487e07ae
...
...
@@ -42,6 +42,9 @@ color: #367FAC;
a
.big
{
font-size
:
14
px
;
}
i
{
color
:
#367FAC
;
}
a
{
color
:
#367FAC
;
}
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