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
be94b101
Commit
be94b101
authored
Apr 17, 2007
by
legenerationlazi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bogus php syntax (was breaking formatting)
parent
ddc1b642
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
DQL (Doctrine Query Language) - Functional Expressions - String functions.php
...Language) - Functional Expressions - String functions.php
+17
-17
No files found.
manual/docs/DQL (Doctrine Query Language) - Functional Expressions - String functions.php
View file @
be94b101
...
@@ -5,14 +5,14 @@ map the concatenation of users firstname and lastname to a value called name
...
@@ -5,14 +5,14 @@ map the concatenation of users firstname and lastname to a value called name
<code
type=
"php"
>
<code
type=
"php"
>
\
$q = new Doctrine_Query();
$q = new Doctrine_Query();
\$users = \
$q->select('CONCAT(u.firstname, u.lastname) name')->from('User u')->execute();
$users =
$q->select('CONCAT(u.firstname, u.lastname) name')->from('User u')->execute();
foreach(
\$users as \
$user) {
foreach(
$users as
$user) {
// here 'name' is not a property of
\
$user,
// here 'name' is not a property of $user,
// its a mapped function value
// its a mapped function value
print
\
$user->name;
print $user->name;
}
}
?>
?>
</code>
</code>
...
@@ -26,12 +26,12 @@ The //SUBSTRING// function returns a string.
...
@@ -26,12 +26,12 @@ The //SUBSTRING// function returns a string.
<code
type=
"php"
>
<code
type=
"php"
>
\
$q = new Doctrine_Query();
$q = new Doctrine_Query();
\$users = \$q->select('u.name')->from('User u')->where(\"SUBSTRING(u.name, 0, 1) = 'z'\
")->execute();
$users = $q->select('u.name')->from('User u')->where("SUBSTRING(u.name, 0, 1) = 'z'
")->execute();
foreach(
\$users as \
$user) {
foreach(
$users as
$user) {
print
\
$user->name;
print $user->name;
}
}
?>
?>
</code>
</code>
...
@@ -46,12 +46,12 @@ not provided, BOTH is assumed. The //TRIM// function returns the trimmed string.
...
@@ -46,12 +46,12 @@ not provided, BOTH is assumed. The //TRIM// function returns the trimmed string.
<code
type=
"php"
>
<code
type=
"php"
>
\
$q = new Doctrine_Query();
$q = new Doctrine_Query();
\$users = \$q->select('u.name')->from('User u')->where(\"TRIM(u.name) = 'Someone'\
")->execute();
$users = $q->select('u.name')->from('User u')->where("TRIM(u.name) = 'Someone'
")->execute();
foreach(
\$users as \
$user) {
foreach(
$users as
$user) {
print
\
$user->name;
print $user->name;
}
}
?>
?>
</code>
</code>
...
@@ -63,12 +63,12 @@ string.
...
@@ -63,12 +63,12 @@ string.
<code
type=
"php"
>
<code
type=
"php"
>
\
$q = new Doctrine_Query();
$q = new Doctrine_Query();
\$users = \$q->select('u.name')->from('User u')->where(\"LOWER(u.name) = 'someone'\
")->execute();
$users = $q->select('u.name')->from('User u')->where("LOWER(u.name) = 'someone'
")->execute();
foreach(
\$users as \
$user) {
foreach(
$users as
$user) {
print
\
$user->name;
print $user->name;
}
}
?>
?>
</code>
</code>
...
...
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