本文整理汇总了PHP中Inventory::updateinv方法的典型用法代码示例。如果您正苦于以下问题:PHP Inventory::updateinv方法的具体用法?PHP Inventory::updateinv怎么用?PHP Inventory::updateinv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Inventory
的用法示例。
在下文中一共展示了Inventory::updateinv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Validate
?>
</tbody>
</table>
</div>
</div>
</div>
<?php
} else {
if (Input::get('item') && Input::get('tkn') == 'edit' && Input::get('inv') == md5('2')) {
if (Input::get('edit') == md5("true")) {
$validate = new Validate();
$validation = $validate->check($_POST, array('category' => array('name' => 'Category', 'required' => true), 'supplier' => array('name' => 'Supplier', 'required' => true), 'goods_id' => array('name' => 'Good ID', 'required' => true), 'goods_name' => array('name' => 'Good Name', 'required' => true), 'goods_qty' => array('name' => 'Quantity', 'required' => true), 'selling_price' => array('name' => 'Selling Price', 'required' => true), 'cost_price' => array('name' => 'Cost Price', 'required' => true)));
if ($validation->passed()) {
$img = new Image();
$update = new Inventory();
$update1 = $update->updateinv('tbl_goods', 'goods_id', Crytion::decryt64(Input::get('item')), array('goods_id' => Input::get('goods_id'), 'goods_name' => Input::get('goods_name'), 'goods_category' => Input::get('category'), 'image' => $img->getimage(), 'image_name' => $img->getimagename(), 'image_type' => $img->getimagetype()));
$update2 = $update->updateinv('tbl_goods_stock', 'goods_id', Crytion::decryt64(Input::get('item')), array('goods_id' => Input::get('goods_id'), 'goods_qty' => Input::get('goods_qty'), 'goods_discount' => Input::get('goods_discount'), 'goods_price_per_unit' => Input::get('selling_price'), 'goods_cost_price_per_unit' => Input::get('cost_price'), 'supplier_id' => Input::get('supplier'), 'date_update' => date('Y-m-d H:i:s'), 'comment' => 'Stock details update'));
$update3 = $update->updateinv('tbl_item_update_record', 'goods_id', Crytion::decryt64(Input::get('item')), array('goods_id' => Input::get('goods_id')));
if ($update1 && $update2 && $update3) {
Session::put('form-success', 'Update Item Success!');
} else {
Session::put('form-error', array('Error in updating item!'));
}
} else {
Session::put('form-error', $validation->error());
}
}
$item = "Select * from tbl_goods a,tbl_goods_stock b where a.goods_id = b.goods_id \n AND a.goods_id = ?";
$itemquery = $con->prepare($item);
$itemquery->execute(array(Crytion::decryt64(Input::get('item'))));
$row = $itemquery->fetch(PDO::FETCH_OBJ);