本文整理汇总了PHP中functions::data_delete方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::data_delete方法的具体用法?PHP functions::data_delete怎么用?PHP functions::data_delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类functions
的用法示例。
在下文中一共展示了functions::data_delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
$CURR_DATE = date('Y-m-d H:i:s');
$sql_order_form_insert = "INSERT INTO order_form_details (ID, PO, CUSTOMER_NUMBER,ORDER_DATE, SOLD_TO, SHIP_TO, CONTACT_PERSON, DELIVERY_DATE, ORDERED_FROM, ORDER_WEB_ID, UPLOAD_TYPE, TRANSACTIONAL_CURR_CODE, ORDER_TYPE, SALESREP_ID, ORG_ID, PRICE_LIST_ID, SHIP_FROM_ORG_ID, SOLD_TO_ORG_ID, CREATED_BY, PAYMENT_TERM_ID, INVOICE_TO_ORG_ID, VESSEL, COMMENTS, ATTRIBUTE12, FREIGHT_TERMS, FREIGHT_VALUE, DAY_SEQUENCE) \n\t\tVALUES (NULL, '{$PO}', {$CUSTOMER_NUMBER} , '{$CURR_DATE}', {$SOLD_TO_ID}, {$SHIP_TO_ID}, '{$CONTACT_PERSON}', '{$DELIVERY_DATE}', 'PORTAL', '{$ORDER_WEB_ID}', 'ORDER', '{$TRANSACTIONAL_CURR_CODE}', {$ORDER_TYPE}, {$SALESREP_ID}, {$ORG_ID}, {$DEFAULTPRICELIST}, {$DEFAULT_WAREHOUSE}, {$SOLD_TO_ORG_ID}, {$CREATED_BY}, {$PAYMENT_TERM_ID}, {$INVOICE_TO_ORG_ID}, '{$VESSEL}', '{$COMMENTS}', '{$ATTRIBUTE12}', '{$FREIGHT_TERMS}', '{$FREIGHT_VALUE}', {$LAST_ID}\t)";
$lastInsertId = $con->data_insert_return_id($sql_order_form_insert);
foreach ($prodArr as $id => $pC) {
$pcl = $prodDetArr[$pC]['price_list_id'];
$pkcd = $prodDetArr[$pC]['pack_code'];
$icd = $prodDetArr[$pC]['item_code'];
$ivd = $prodDetArr[$pC]['inventory_id'];
$pksz = $prodDetArr[$pC]['pack'];
$qty = $prodDetArr[$pC]['quantity'];
$uom = $prodDetArr[$pC]['uom'];
$up = $prodDetArr[$pC]['AVAILABLE_PRICE'];
$oid = $prodDetArr[$pC]['org_id'];
$rmk = $prodDetArr[$pC]['remarks'];
$tot = $up * $qty;
$sql_order_products_insert = "INSERT INTO order_products (ID, ORDER_ID, PRICE_LIST_ID, PRODUCT_CODE, PACKAGE_CODE, ITEM_CODE, INVENTORY_ITEM_ID, PACKAGE_QTY, PRODUCT_TOTAL, QUANTITY, UOM, UNIT_PRICE,\tORG_ID, REMARKS) \n\t\t\tVALUES (NULL, {$lastInsertId}, {$pcl} , {$pC}, '{$pkcd}', '{$icd}', {$ivd}, '{$pksz}', '{$tot}', '{$qty}', '{$uom}', {$up}, {$oid}, '{$rmk}') ";
$result = $con->data_insert_return_id($sql_order_products_insert);
}
}
}
/******** Remove Products From Cart *****/
$sql_empty_cart = "DELETE FROM customer_cart WHERE CUSTOMER_NUMBER =" . $CUSTOMER_NUMBER;
$result = $con->data_delete($sql_empty_cart);
$_SESSION['cart_count'] = "0";
/******** Send mail to customer, sales person and customer service *****/
?>
<div class="container">
<div class="row animated fadeInRight">
<h1>Thanks for Buying with DorfKetal.</h1>
</div>
</div>
示例2: VALUES
if ($result1 != "no") {
echo "Product already in the Cart";
} else {
$sql = "INSERT INTO customer_cart (CUSTOMER_NUMBER, PRODUCT_CODE, ITEM_DESCRIPTION, PACKAGING_SIZE, QUANTITY, AVAILABLE_PRICE, REMARK) VALUES ({$cust_id},{$prod_code},'{$prod_desc}','{$pkgsize}','{$qty}','{$price}','{$remark}')";
$result = $con->data_insert($sql);
$_SESSION['cart_count'] = $cart_count + $increment;
echo $_SESSION['cart_count'];
}
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "removecart") {
$prod_code = $_REQUEST['prod_code'];
$cust_id = $_SESSION['cust_id'];
$cart_count = $_SESSION['cart_count'];
$increment = 1;
$sql = "DELETE FROM customer_cart WHERE PRODUCT_CODE =" . $prod_code . " AND CUSTOMER_NUMBER =" . $cust_id;
$result = $con->data_delete($sql);
$_SESSION['cart_count'] = $cart_count - $increment;
echo $_SESSION['cart_count'];
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "updatecart") {
$prod_code = $_REQUEST['prod_code'];
$remark = $_REQUEST['remark'];
$qty = $_REQUEST['qty'];
$pkgsize = $_REQUEST['pkgsize'];
$cust_id = $_SESSION['cust_id'];
$sql = "UPDATE customer_cart SET QUANTITY = '" . $qty . "', PACKAGING_SIZE ='" . $pkgsize . "', REMARK = '" . $remark . "' WHERE CUSTOMER_NUMBER = " . $_SESSION['cust_id'] . " AND PRODUCT_CODE = " . $prod_code;
$result = $con->data_update($sql);
echo "success";
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "getcatapplication") {
$cat_name = $_REQUEST['cat_name'];
示例3:
exit;
}
exit;
}
if ($_REQUEST['action'] == "insertassignconsignment") {
$query = "INSERT INTO assign_consignment(user_id, consignment_id, orign_location, destination_location, status) VALUES \n\t(" . $_REQUEST['user_id'] . "," . $_REQUEST['consigmant_id'] . ",'" . $_REQUEST['orign_location'] . "','" . $_REQUEST['destination_location'] . "','" . $_REQUEST['status'] . "')";
$result = $con->data_insert($query);
if ($result > 0) {
echo "success";
exit;
}
}
if ($_REQUEST['action'] == "deleteDocument") {
if ($_REQUEST['document_type'] == 's') {
$query = "UPDATE document_detatils SET shipping_document='', shipping_document_update='' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result = $con->data_delete($query);
if ($result > 0) {
echo "success";
}
}
if ($_REQUEST['document_type'] == 'c') {
$query = "UPDATE document_detatils SET commercial_invoice='', commercial_invoice_update='' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result = $con->data_delete($query);
if ($result > 0) {
echo "success";
}
}
if ($_REQUEST['document_type'] == 'i') {
$query = "UPDATE document_detatils SET india_commercial_invoice='', india_commercial_invoice_update='' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result = $con->data_delete($query);
if ($result > 0) {