|
@@ 515-519 (lines=5) @@
|
| 512 |
|
foreach ($this->getUpdatedFields() as $updatedField) { |
| 513 |
|
$query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']); |
| 514 |
|
$ret = $ret && $xoopsDB->queryF($query); |
| 515 |
|
if (!$ret) { |
| 516 |
|
echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
| 517 |
|
} else { |
| 518 |
|
echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
| 519 |
|
} |
| 520 |
|
} |
| 521 |
|
|
| 522 |
|
return $ret; |
|
@@ 540-544 (lines=5) @@
|
| 537 |
|
$query = sprintf('UPDATE %s SET %s = %s WHERE %s %s', $this->name(), $updatedWhere['name'], $updatedWhere['value'], $updatedWhere['name'], $updatedWhere['where']); |
| 538 |
|
//echo $query."<br>"; |
| 539 |
|
$ret = $ret && $xoopsDB->queryF($query); |
| 540 |
|
if (!$ret) { |
| 541 |
|
echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
| 542 |
|
} else { |
| 543 |
|
echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
| 544 |
|
} |
| 545 |
|
} |
| 546 |
|
|
| 547 |
|
return $ret; |