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
1fbb8b6c
Commit
1fbb8b6c
authored
Mar 20, 2007
by
gnat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unitialized or typo variables
parent
04d0993a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
14 deletions
+11
-14
Db2.php
lib/Doctrine/Connection/Db2.php
+4
-4
Mysql.php
lib/Doctrine/Export/Mysql.php
+1
-1
Query.php
lib/Doctrine/Query.php
+5
-5
RawSql.php
lib/Doctrine/RawSql.php
+1
-4
No files found.
lib/Doctrine/Connection/Db2.php
View file @
1fbb8b6c
...
...
@@ -43,12 +43,12 @@ class Doctrine_Connection_Db2 extends Doctrine_Connection
public
function
modifyLimitQuery
(
$query
,
$limit
,
$offset
)
{
if
(
$limit
<=
0
)
return
$
sql
;
return
$
query
;
if
(
$offset
==
0
)
{
return
$
sql
.
' FETCH FIRST '
.
$coun
t
.
' ROWS ONLY'
;
return
$
query
.
' FETCH FIRST '
.
$limi
t
.
' ROWS ONLY'
;
}
else
{
$sqlPieces
=
explode
(
'from'
,
$
sql
);
$sqlPieces
=
explode
(
'from'
,
$
query
);
$select
=
$sqlPieces
[
0
];
$table
=
$sqlPieces
[
1
];
...
...
@@ -57,7 +57,7 @@ class Doctrine_Connection_Db2 extends Doctrine_Connection
$sql
=
'WITH OFFSET AS('
.
$select
.
', ROW_NUMBER() '
.
'OVER(ORDER BY '
.
$col
[
1
]
.
') AS dctrn_rownum FROM '
.
$table
.
')'
.
$select
.
'FROM OFFSET WHERE dctrn_rownum BETWEEN '
.
$offset
.
'AND '
.
(
$offset
+
$
coun
t
-
1
);
'AND '
.
(
$offset
+
$
limi
t
-
1
);
return
$sql
;
}
}
...
...
lib/Doctrine/Export/Mysql.php
View file @
1fbb8b6c
...
...
@@ -303,7 +303,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
}
else
{
$oldFieldName
=
$fieldName
;
}
$oldFieldName
=
$this
->
conn
->
quoteIdentifier
(
$old
_field_n
ame
,
true
);
$oldFieldName
=
$this
->
conn
->
quoteIdentifier
(
$old
FieldN
ame
,
true
);
$query
.=
"CHANGE
$oldFieldName
"
.
$this
->
getDeclaration
(
$field
[
'definition'
][
'type'
],
$fieldName
,
$field
[
'definition'
]);
}
}
...
...
lib/Doctrine/Query.php
View file @
1fbb8b6c
...
...
@@ -135,7 +135,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
$tableAlias
=
$this
->
getTableAlias
(
$componentAlias
);
if
(
!
isset
(
$this
->
tables
[
$tableAlias
]))
throw
new
Doctrine_Query_Exception
(
'Unknown component path '
.
$component
Path
);
throw
new
Doctrine_Query_Exception
(
'Unknown component path '
.
$component
Alias
);
$table
=
$this
->
tables
[
$tableAlias
];
...
...
@@ -247,7 +247,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
$tableAlias
=
$this
->
getTableAlias
(
$componentAlias
);
if
(
!
isset
(
$this
->
tables
[
$tableAlias
]))
{
throw
new
Doctrine_Query_Exception
(
'Unknown component path '
.
$component
Path
);
throw
new
Doctrine_Query_Exception
(
'Unknown component path '
.
$component
Alias
);
}
$root
=
current
(
$this
->
tables
);
...
...
@@ -491,7 +491,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
{
$class
=
'Doctrine_Query_Having'
;
$parser
=
new
$class
(
$this
);
$this
->
parts
[
'having'
][]
=
$parser
->
parse
(
$
orderby
);
$this
->
parts
[
'having'
][]
=
$parser
->
parse
(
$
having
);
return
$this
;
}
...
...
@@ -1216,7 +1216,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
}
else
{
if
(
!
(
substr_count
(
$term
[
$i
],
"'"
)
&
1
)
&&
!
(
substr_count
(
$term
[
$i
],
"
\"
"
)
&
1
)
&&
!
(
substr_count
(
$term
[
$i
],
""
)
&
1
)
!
(
substr_count
(
$term
[
$i
],
"
�
"
)
&
1
)
)
{
$i
++
;
}
}
}
else
{
...
...
@@ -1231,7 +1231,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
}
else
{
if
(
!
(
substr_count
(
$term
[
$i
],
"'"
)
&
1
)
&&
!
(
substr_count
(
$term
[
$i
],
"
\"
"
)
&
1
)
&&
!
(
substr_count
(
$term
[
$i
],
""
)
&
1
)
!
(
substr_count
(
$term
[
$i
],
"
�
"
)
&
1
)
)
{
$i
++
;
}
}
}
...
...
lib/Doctrine/RawSql.php
View file @
1fbb8b6c
...
...
@@ -227,11 +227,8 @@ class Doctrine_RawSql extends Doctrine_Hydrate
if
(
$table
)
{
$tableName
=
$table
->
getAliasName
(
$component
);
$table
=
$this
->
conn
->
getTable
(
$tableName
);
}
else
{
$table
=
$this
->
conn
->
getTable
(
$component
);
}
$table
=
$this
->
conn
->
getTable
(
$component
);
$this
->
tables
[
$alias
]
=
$table
;
$this
->
fetchModes
[
$alias
]
=
Doctrine
::
FETCH_IMMEDIATE
;
$this
->
tableAliases
[
$currPath
]
=
$alias
;
...
...
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