本文整理匯總了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);