Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
到目前为止,我如何将 JTable 属性设置为 null 并将其保存为我的代码,但没有成功:
$table = JTable::getInstance($type='detalegrupy', $prefix='FootsalTable', $config = array()); $table->load($id); $table->promotion = NULL; $id_group = $table->id_group; $table->store();
或如何将其恢复为默认值。
我找到了答案,
$table->store(TRUE);
完成了工作。抱歉垃圾邮件
编辑文件administrator/components/YOUR_COMPONENT/tables/NAME_OF_YOUR_TABLE.php并在表类中添加这个函数:
administrator/components/YOUR_COMPONENT/tables/NAME_OF_YOUR_TABLE.php
public function store($updateNulls = true) { return parent::store($updateNulls); }