/** * Deletes the item corresponding to the passed primary key value from * the table. * * Add authorization or any logical checks for secure access to your data * * * @return void */ public function deleteItem($itemID) { $condition = array('id' => $itemID); $result = tdb::delete(self::$tablename, array('condition' => $condition)); if ($result) { return array('code' => 0, 'msg' => '操作成功', 'data' => $result); } else { return array('code' => 1, 'msg' => '操作失败', 'data' => $result); } }