Files
gutachten_t3/packages/gutachten/Classes/DB/Update/UpdateField.php
T

26 lines
539 B
PHP

<?php
namespace HermannTelser\Gutachten\DB\Update;
use HermannTelser\Gutachten\DB\DbFunction;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class UpdateField
{
/**
* @param mixed $id
*
* @return bool
*/
public static function update()
{
$table = GeneralUtility::_GP('table');
$field = GeneralUtility::_GP('field');
$value = GeneralUtility::_GP('value');
$rowid = GeneralUtility::_GP('id');
$update_array = [];
$update_array[$field] = $value;
DbFunction::secureUpdate($table, $update_array, ['id' => $rowid]);
}
}