Commit 845eaf71 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Small fixes in update_record

parent fe8ca268
......@@ -901,7 +901,7 @@ function update_record($table, $dataobject, $where=null) {
// look for the values in $dataobject and complain bitterly if they're not there
// @todo throw hissy fit
foreach ($where as $field) {
if (!isset($dataobject[$field])) {
if (!isset($dataobject->{$field})) {
throw new SQLException('Field in where clause not in the update object');
}
$wherefields[] = $field;
......@@ -953,7 +953,7 @@ function update_record($table, $dataobject, $where=null) {
$whereclause = '';
$count = 0;
$numdd = count($wherefields);
$numddd = count($wherefields);
foreach ($wherefields as $field) {
$count++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment