【发布时间】:2014-03-13 13:51:04
【问题描述】:
我看到可以使用带有 Jtable 加载的数组,我尝试了以下方法:
public function delete($id = null) {
$app = JFactory::getApplication();
$id = $id ? $id : $app->input->get('files', array(), 'ARRAY');
$file = JTable::getInstance('Document','Table');
$file->load($id);
$file->date_removed = date("Y-m-d H:i:s",time());
if($file->store())
{
return true;
} else {
return false;
}
}
print_r($id) 是:
Array
(
[0] => 1
[1] => 2
)
但我没有运气。我不断收到以下错误:
0 - 数据库中缺少字段:TableDocument 1。
非常感谢任何帮助。
【问题讨论】:
-
哇,该文档链接不那么出色。 :~(
标签: php arrays joomla joomla3.0