Hi, sir Update query is not working |
if ($invoice_no != null) {
// echo "This is last invoice number" . $invoice_no; for ($i = 0; $i < count($ar_price); $i++) { $rem_qty = $ar_tqty[$i] - $ar_qty[$i]; if ($rem_qty < 0) { echo "Product Out Of Stock!"; } else { $modelpro = new productModel(); $modelpro ->where('productName', $ar_pro_name[$i]) ->set(['Quantity' => $rem_qty]) ->update(); } $modelInvo = new invoiceDetailModel(); $saveInvoiceDetail = [ 'invoice_no' => $invoice_no, 'product_name' => $ar_pro_name[$i], 'price' => $ar_price[$i], 'qty' => $ar_qty[$i], ]; $modelInvo->save($saveInvoiceDetail); } } |
Messages In This Thread |
Hi, sir Update query is not working - by sandeep1992 - 04-15-2021, 10:23 PM
RE: Hi, sir Update query is not working - by php_rocs - 04-16-2021, 07:18 AM
RE: Hi, sir Update query is working after two days searching And I am using CI 4 - by sandeep1992 - 04-16-2021, 11:16 AM
RE: Hi, sir Update query is not working - by davis.lasis - 04-16-2021, 12:21 PM
|