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
8875558a
Commit
8875558a
authored
Oct 11, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 11, 2006
Browse files
Fixed fatal error caused by one of the functions being commented out.
parent
58c4fb78
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/dml.php
View file @
8875558a
...
...
@@ -553,7 +553,14 @@ function get_records_sql_menu($sql,$values=null) {
function
get_field
(
$table
,
$field
,
$field1
,
$value1
,
$field2
=
null
,
$value2
=
null
,
$field3
=
null
,
$value3
=
null
)
{
$select
=
where_clause_prepared
(
$field1
,
$field2
,
$field3
);
$values
=
where_values_prepared
(
$value1
,
$value2
,
$value3
);
return
get_field_sql
(
'SELECT '
.
$field
.
' FROM '
.
get_config
(
'dbprefix'
)
.
$table
.
' '
.
$select
,
$values
);
$rs
=
get_recordset_sql
(
$sql
,
$values
);
if
(
$rs
->
RecordCount
()
==
1
)
{
return
reset
(
$rs
->
fields
);
}
else
{
throw
new
DatalibException
(
'Got more than one row when getting a field value'
);
}
//return get_field_sql('SELECT ' . $field . ' FROM ' . get_config('dbprefix') . $table . ' ' . $select, $values);
}
/**
...
...
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