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
14781f1d
Commit
14781f1d
authored
Aug 30, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RawSql docs + codes updated
parent
f1df2699
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
1 deletion
+22
-1
Basic Components - RawSql - Adding components.php
...l/codes/Basic Components - RawSql - Adding components.php
+1
-1
Advanced components - View - Using views.php
manual/docs/Advanced components - View - Using views.php
+1
-0
Basic Components - RawSql - Adding components.php
...al/docs/Basic Components - RawSql - Adding components.php
+6
-0
Basic Components - RawSql - Introduction.php
manual/docs/Basic Components - RawSql - Introduction.php
+4
-0
Basic Components - RawSql - Using SQL.php
manual/docs/Basic Components - RawSql - Using SQL.php
+10
-0
No files found.
manual/codes/Basic Components - RawSql - Adding components.php
View file @
14781f1d
...
...
@@ -7,7 +7,7 @@ $query->parseQuery("SELECT {entity.*}, {phonenumber.*}
ON phonenumber.entity_id = entity.id"
);
$query
->
addComponent
(
"entity"
,
"Entity"
);
$query
->
addComponent
(
"phonenumber"
,
"Phonenumber"
);
$query
->
addComponent
(
"phonenumber"
,
"
Entity.
Phonenumber"
);
$entities
=
$query
->
execute
();
?>
manual/docs/Advanced components - View - Using views.php
View file @
14781f1d
manual/docs/Basic Components - RawSql - Adding components.php
View file @
14781f1d
The
following
example
represents
a
bit
harder
case
where
we
select
all
entities
and
their
associated
phonenumbers
using
a
left
join
.
Again
we
wrap
all
the
columns
in
curly
brackets
but
we
also
specify
what
tables
associate
to
which
components
.
<
br
\
>
<
br
\
>
First
we
specify
that
table
entity
maps
to
record
class
'
Entity
'
<
br
\
><
br
\
>
Then
we
specify
that
table
phonenumber
maps
to
Entity
.
Phonenumber
(
meaning
phonenumber
associated
with
an
entity
)
manual/docs/Basic Components - RawSql - Introduction.php
View file @
14781f1d
In
Doctrine
you
may
express
your
queries
in
the
native
SQL
dialect
of
your
database
.
This
is
useful
if
you
want
to
use
the
full
power
of
your
database
vendor
'
s
features
(
like
query
hints
or
the
CONNECT
keyword
in
Oracle
)
.
<
br
\
><
br
\
>
It
should
be
noted
that
not
all
the
sql
is
portable
.
So
when
you
make
database
portable
applications
you
might
want
to
use
the
DQL
API
instead
.
manual/docs/Basic Components - RawSql - Using SQL.php
View file @
14781f1d
The
rawSql
component
works
in
much
same
way
as
Zend_Db_Select
.
You
may
use
method
overloading
like
$q
->
from
()
->
where
()
or
just
use
$q
->
parseQuery
()
.
There
are
some
differences
though
:
<
br
\
><
br
\
>
1.
In
Doctrine_RawSql
component
you
need
to
specify
all
the
mapped
table
columns
in
curly
brackets
{}
this
is
used
for
smart
column
aliasing
.
<
br
\
><
br
\
>
2.
When
joining
multiple
tables
you
need
to
specify
the
component
paths
with
addComponent
()
method
<
br
\
><
br
\
>
The
following
example
represents
a
very
simple
case
where
no
addComponent
()
calls
are
needed
.
Here
we
select
all
entities
from
table
entity
with
all
the
columns
loaded
in
the
records
.
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