function editDailySupply($datafields, $tablefields, $supcode, $date) { $dbmain = new DBmain(); $condition = "supplier_code='" . $supcode . "' AND date='" . $date . "'"; $boolres = $dbmain->edit("daily_supply", $datafields, $tablefields, $condition); if ($boolres == true) { return true; } else { return false; } }
function editSupplier($datafields, $tablefields, $supcode) { $dbmain = new DBmain(); $condition = "supplier_code='" . $supcode . "'"; $boolres = $dbmain->edit("suppliers", $datafields, $tablefields, $condition); if ($boolres == true) { return true; } else { return false; } }
function setMessageAsRead($id) { $dbmain = new DBmain(); $condition = "WHERE message_id={$id}"; $res = $dbmain->edit("message_temp", array(1), array("approve"), $condition); }