本文整理匯總了PHP中item::search方法的典型用法代碼示例。如果您正苦於以下問題:PHP item::search方法的具體用法?PHP item::search怎麽用?PHP item::search使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類item
的用法示例。
在下文中一共展示了item::search方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<?php
require_once 'core/init.php';
if (count($_POST) > 0) {
$item_copy_data = array("id" => null, "no" => null, "owner" => $_POST["copy_owner"], "status" => 1, "barcode" => $_POST["barcode"], "price" => $_POST["price"], "installed_date" => date('Y-m-d'), "condition" => "Working Properly", "supplier" => $_POST["supplier"], "item_id" => $_POST['itemId']);
$_SESSION['form_data'] = $item_copy_data;
$new_item_copy = new ItemCopy();
$new_item_copy->createNew($_SESSION["form_data"]);
if ($new_item_copy->register()) {
$parentItem = item::search(array("item_id" => $_POST['itemId']));
$parentItem->count_up(1);
$message = "You have successfully Inserted an Item Copy!!";
echo $message;
} else {
$message = "The Item Copy insertion was unsuccessful.";
echo $message;
}
unset($_SESSION["form_data"]);
}
?>