本文整理汇总了PHP中tool::getDate方法的典型用法代码示例。如果您正苦于以下问题:PHP tool::getDate方法的具体用法?PHP tool::getDate怎么用?PHP tool::getDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tool
的用法示例。
在下文中一共展示了tool::getDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
public function update()
{
$where = array("id='{$this->R['id']}'");
$updateData = $this->getRequest()->filter($this->fields);
if ($this->R['is_record'] == 0 && $this->R['order_delivery'] == '已发货') {
$this->tables = array(DB_FREFIX . 'record');
foreach ($_POST['goods_id'] as $key => $value) {
$recordDate['goods_id'] = $value;
$recordDate['user'] = $_POST['user'];
$recordDate['name'] = $_POST['goods_name'][$value];
$recordDate['num'] = $_POST['goods_num'][$value];
$recordDate['attr'] = $_POST['goods_attr'][$value];
$recordDate['price'] = $_POST['goods_price_sale'][$value];
$recordDate['date'] = tool::getDate();
parent::add($recordDate);
}
}
if ($this->R['order_state'] == '已取消' || $this->R['refund'] == 2) {
$order_goods = parent::select(array('id', 'goods'), array('where' => $where));
$goods = unserialize(htmlspecialchars_decode($order_goods[0]->goods));
$this->tables = array(DB_FREFIX . 'goods');
foreach ($goods as $key => $value) {
$value = unserialize($value);
parent::update(array("id='{$key}'"), array('inventory' => array('inventory+' . $value[num]), 'sale_count' => array('sale_count-' . $value[num])));
}
}
$this->tables = array(DB_FREFIX . 'order');
$updateData['is_record'] = 1;
return parent::update($where, $updateData);
}