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
45e9bc84
Commit
45e9bc84
authored
Oct 20, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DQL new docs, refs #181
parent
96bf0709
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
66 additions
and
0 deletions
+66
-0
DQL (Doctrine Query Language) - Conditional expressions - All and Any Expressions.php
...) - Conditional expressions - All and Any Expressions.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - All or Any Expressions.php
...e) - Conditional expressions - All or Any Expressions.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - Between expressions.php
...uage) - Conditional expressions - Between expressions.php
+1
-0
DQL (Doctrine Query Language) - Conditional expressions - Exists Expressions.php
...guage) - Conditional expressions - Exists Expressions.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - In expressions.php
... Language) - Conditional expressions - In expressions.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - Input parameters.php
...anguage) - Conditional expressions - Input parameters.php
+14
-0
DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php
...anguage) - Conditional expressions - Like Expressions.php
+8
-0
DQL (Doctrine Query Language) - Conditional expressions - Literals.php
... Query Language) - Conditional expressions - Literals.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php
...ional expressions - Operators and operator precedence.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - Path expressions.php
...anguage) - Conditional expressions - Path expressions.php
+0
-0
DQL (Doctrine Query Language) - Conditional expressions - Subqueries.php
...uery Language) - Conditional expressions - Subqueries.php
+19
-0
DQL (Doctrine Query Language) - Examples.php
manual/codes/DQL (Doctrine Query Language) - Examples.php
+0
-0
DQL (Doctrine Query Language) - FROM clause.php
manual/codes/DQL (Doctrine Query Language) - FROM clause.php
+0
-0
DQL (Doctrine Query Language) - Functional Expressions - Arithmetic Functions.php
...uage) - Functional Expressions - Arithmetic Functions.php
+0
-0
DQL (Doctrine Query Language) - Functional Expressions - Collection functions.php
...uage) - Functional Expressions - Collection functions.php
+0
-0
DQL (Doctrine Query Language) - Functional Expressions - Datetime Functions.php
...nguage) - Functional Expressions - Datetime Functions.php
+0
-0
DQL (Doctrine Query Language) - Functional Expressions - String Functions.php
...Language) - Functional Expressions - String Functions.php
+0
-0
DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php
... (Doctrine Query Language) - GROUP BY, HAVING clauses.php
+10
-0
DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php
... (Doctrine Query Language) - LIMIT and OFFSET clauses.php
+14
-0
DQL (Doctrine Query Language) - SELECT queries.php
.../codes/DQL (Doctrine Query Language) - SELECT queries.php
+0
-0
DQL (Doctrine Query Language) - WHERE clause.php
...al/codes/DQL (Doctrine Query Language) - WHERE clause.php
+0
-0
No files found.
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - All and Any Expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - All or Any Expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Between expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Exists Expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - In expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Input parameters.php
0 → 100644
View file @
45e9bc84
<?php
// POSITIONAL PARAMETERS:
$users
=
$conn
->
query
(
"FROM User WHERE User.name = ?"
,
array
(
'Arnold'
));
$users
=
$conn
->
query
(
"FROM User WHERE User.id > ? AND User.name LIKE ?"
,
array
(
50
,
'A%'
));
// NAMED PARAMETERS:
$users
=
$conn
->
query
(
"FROM User WHERE User.name = :name"
,
array
(
':name'
=>
'Arnold'
));
$users
=
$conn
->
query
(
"FROM User WHERE User.id > :id AND User.name LIKE :name"
,
array
(
':id'
=>
50
,
':name'
=>
'A%'
));
?>
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Like Expressions.php
0 → 100644
View file @
45e9bc84
<?php
// finding all users whose email ends with '@gmail.com'
$users
=
$conn
->
query
(
"FROM User u, u.Email e WHERE e.address LIKE '%@gmail.com'"
);
// finding all users whose name starts with letter 'A'
$users
=
$conn
->
query
(
"FROM User u WHERE u.name LIKE 'A%'"
);
?>
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Literals.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Operators and operator precedence.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Path expressions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Conditional expressions - Subqueries.php
0 → 100644
View file @
45e9bc84
<?php
// finding all users which don't belong to any group 1
$query
=
"FROM User WHERE User.id NOT IN
(SELECT u.id FROM User u
INNER JOIN u.Group g WHERE g.id = ?"
;
$users
=
$conn
->
query
(
$query
,
array
(
1
));
// finding all users which don't belong to any groups
// Notice:
// the usage of INNER JOIN
// the usage of empty brackets preceding the Group component
$query
=
"FROM User WHERE User.id NOT IN
(SELECT u.id FROM User u
INNER JOIN u.Group g)"
;
$users
=
$conn
->
query
(
$query
);
?>
manual/codes/DQL (Doctrine Query Language) - Examples.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - FROM clause.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Functional Expressions - Arithmetic Functions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Functional Expressions - Collection functions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Functional Expressions - Datetime Functions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - Functional Expressions - String Functions.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - GROUP BY, HAVING clauses.php
0 → 100644
View file @
45e9bc84
<?php
// retrieve all users and the phonenumber count for each user
$users
=
$conn
->
query
(
"SELECT u.*, COUNT(p.id) count FROM User u, u.Phonenumber p GROUP BY u.id"
);
foreach
(
$users
as
$user
)
{
print
$user
->
name
.
' has '
.
$user
->
Phonenumber
->
getAggregateValue
(
'count'
)
.
' phonenumbers'
;
}
?>
manual/codes/DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php
0 → 100644
View file @
45e9bc84
<?php
// retrieve the first 20 users and all their associated phonenumbers
$users
=
$conn
->
query
(
"SELECT u.*, p.* FROM User u, u.Phonenumber p LIMIT 20"
);
foreach
(
$users
as
$user
)
{
print
' --- '
.
$user
->
name
.
' --- \n'
;
foreach
(
$user
->
Phonenumber
as
$p
)
{
print
$p
->
phonenumber
.
'\n'
;
}
}
?>
manual/codes/DQL (Doctrine Query Language) - SELECT queries.php
0 → 100644
View file @
45e9bc84
manual/codes/DQL (Doctrine Query Language) - WHERE clause.php
0 → 100644
View file @
45e9bc84
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