Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
7b796c5f
Commit
7b796c5f
authored
Sep 11, 2007
by
Penny Leach
Committed by
Nigel McNie
Oct 17, 2007
Browse files
more identifier quoting in dml - this time in update_record
parent
df928794
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/dml.php
View file @
7b796c5f
...
@@ -1122,7 +1122,7 @@ function update_record($table, $dataobject, $where=null) {
...
@@ -1122,7 +1122,7 @@ function update_record($table, $dataobject, $where=null) {
foreach
(
$ddd
as
$key
=>
$value
)
{
foreach
(
$ddd
as
$key
=>
$value
)
{
$count
++
;
$count
++
;
$update
.
=
$key
.
' = ? '
;
$update
.
=
db_quote_identifier
(
$key
)
.
' = ? '
;
if
(
$count
<
$numddd
)
{
if
(
$count
<
$numddd
)
{
$update
.
=
', '
;
$update
.
=
', '
;
}
}
...
@@ -1135,7 +1135,7 @@ function update_record($table, $dataobject, $where=null) {
...
@@ -1135,7 +1135,7 @@ function update_record($table, $dataobject, $where=null) {
foreach
(
$wherefields
as
$field
)
{
foreach
(
$wherefields
as
$field
)
{
$count
++
;
$count
++
;
$whereclause
.
=
$field
.
' = ? '
;
$whereclause
.
=
db_quote_identifier
(
$field
)
.
' = ? '
;
if
(
$count
<
$numddd
)
{
if
(
$count
<
$numddd
)
{
$whereclause
.
=
' AND '
;
$whereclause
.
=
' AND '
;
}
}
...
...
Write
Preview
Supports
Markdown
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