本文整理汇总了PHP中Table::setSQLType方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setSQLType方法的具体用法?PHP Table::setSQLType怎么用?PHP Table::setSQLType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::setSQLType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MessageAlert
$id = $_GET['id'];
$suppName = $_POST['txtSupplierName'];
$suppAddress = $_POST['txtSupplierAddress'];
$suppEmailAddress = $_POST['txtSupplierEmailAddress'];
$suppContactNo = $_POST['txtSupplierContactNo'];
$suppContactPerson = $_POST['txtSupplierContactPerson'];
$suppTIN = $_POST['txtSupplierTIN'];
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET SUPPLIER
$supplier = new Table;
$supplier->setSQLType($fms_db->getSQLType());
$supplier->setInstance($fms_db->getInstance());
$supplier->setTable("suppliermaster");
$supplier->setValues("supplierName = '$suppName',supplierAddress = '$suppAddress',supplierEmailAddress = '$suppEmailAddress'
,supplierContactNo = '$suppContactNo',contactPerson = '$suppContactPerson',TIN = '$suppTIN'
,modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$supplier->setParam("WHERE supplierID = '$id'");
$supplier->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
$url = BASE_URL . V_SUPPLIER;
$msg = "Supplier successfully updated.";
$alert = new MessageAlert();
示例2:
}
// -- END WORK ORDER FOR APPROVAL
// APPROVED WORK ORDER
if(isset($_POST['approved']) && !empty($_POST['approved']) && $_POST['approved'] == 1){
$apprRemarks = $_POST['txtApproverRemarks'];
$status = $_POST['txtStatus'];
$id = $worefno;
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET WORK ORDER
$workorder = new Table;
$workorder->setSQLType($fms_db->getSQLType());
$workorder->setInstance($fms_db->getInstance());
$workorder->setTable("workordermaster");
$workorder->setValues("approverRemarks = '$apprRemarks', status = '$status', approvedDate = '$today'");
$workorder->setParam("WHERE woReferenceNo = '$id'");
$workorder->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
switch($status){
case 2: $statusDesc = 'approved'; break;
case 7: $statusDesc = 'disapproved'; break;
default: break;
}
示例3:
$equipment->setParam("WHERE equipmentID = '$id'");
$equipment->doQuery("update");
if($curAssignee != $assignee){
// SAVE ASSIGNEE EQUIPMENT
$ins_ass_equip = new Table;
$ins_ass_equip->setSQLType($fms_db->getSQLType());
$ins_ass_equip->setInstance($fms_db->getInstance());
$ins_ass_equip->setTable("assigneeequipment");
$ins_ass_equip->setField("id,assigneeID,equipmentID,assignedStart");
$ins_ass_equip->setValues("'$newNum','$assignee','$id','$today'");
$ins_ass_equip->doQuery("save");
// UPDATE ASSIGNEE EQUIPMENT
$upd_ass_equip = new Table;
$upd_ass_equip->setSQLType($fms_db->getSQLType());
$upd_ass_equip->setInstance($fms_db->getInstance());
$upd_ass_equip->setTable("assigneeequipment");
$upd_ass_equip->setValues("assignedEnd = '$today', isCurrent = '0'");
$upd_ass_equip->setParam("WHERE assigneeID = '$curAssignee' AND equipmentID = '$id'");
$upd_ass_equip->doQuery("update");
}
// CLOSING FMS DB
$fms_db->DBClose();
// UPDATE CONTROL NO
UpdateCtrlNo("assignee_equipment");
if($_FILES['txtEquipmentPhoto']['size'] > 0){
if (!is_dir($dir)) {
示例4: generatePassword
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET USER
$usermst = new Table;
$usermst->setSQLType($fms_db->getSQLType());
$usermst->setInstance($fms_db->getInstance());
$usermst->setView("v_usermaster");
$usermst->setParam("ORDER BY userID");
$usermst->doQuery("query");
$row_usermst = $usermst->getLists();
// GET USER
$getuser = new Table;
$getuser->setSQLType($fms_db->getSQLType());
$getuser->setInstance($fms_db->getInstance());
$getuser->setView("v_usermaster");
$getuser->setParam("WHERE userID = '$sys_UserID'");
$getuser->doQuery("query");
$row_getuser = $getuser->getLists();
$userPass = $row_getuser[0]['userPass'];
// CLOSING FMS DB
$fms_db->DBClose();
function generatePassword($password){
$salt = 'FleetManagementSystem';
$newpass = md5(sha1($salt.$password));
return $newpass;
示例5: date
$id = $_GET['id'];
$title = $_POST['txtTitle'];
$location = $_POST['txtLocation'];
$category = $_POST['txtCategory'];
$desc = $_POST['txtDescription'];
$startDate = $_POST['txtStartDate'] . ' ' . date("h:i:s");
$dueDate = $_POST['txtDueDate'] . ' ' . date("h:i:s");
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET REMINDER
$parts = new Table;
$parts->setSQLType($fms_db->getSQLType());
$parts->setInstance($fms_db->getInstance());
$parts->setTable("remindermaster");
$parts->setValues("title = '$title', description = '$desc', location = '$location', category = '$category'
, startDate = '$startDate', dueDate = '$dueDate'
, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$parts->setParam("WHERE reminderID = '$id'");
$parts->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
$url = BASE_URL . V_REMINDERS;
$msg = "Reminder successfully updated.";
$alert = new MessageAlert();
示例6: MessageAlert
}
// -- END EDIT CATEGORY --
// -- START UPDATE MAKE --
if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){
$id = $_GET['id'];
$makeName = $_POST['txtMakeName'];
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET MAKE
$make = new Table;
$make->setSQLType($fms_db->getSQLType());
$make->setInstance($fms_db->getInstance());
$make->setTable("makemaster");
$make->setValues("makeName = '$makeName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$make->setParam("WHERE makeID = '$id'");
$make->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
$url = BASE_URL . V_MAKE;
$msg = "Make successfully updated.";
$alert = new MessageAlert();
$alert->setURL($url);
$alert->setMessage($msg);
示例7:
if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){
$id = $_GET['id'];
$desc = $_POST['txtDescription'];
$type = $_POST['txtControlType'];
$code = $_POST['txtControlCode'];
$noofdigit = $_POST['txtNoOfDigit'];
$lastdigit = $_POST['txtLastDigit'];
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET CONTROL NO
$ctrlno = new Table;
$ctrlno->setSQLType($fms_db->getSQLType());
$ctrlno->setInstance($fms_db->getInstance());
$ctrlno->setTable("controlnomaster");
$ctrlno->setValues("description = '$desc', type = '$type', code = '$code', noOfDigit = '$noofdigit'
, lastDigit = '$lastdigit', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$ctrlno->setParam("WHERE id = '$id'");
$ctrlno->doQuery("update");
$row_ctrlno = $ctrlno->getLists();
$res_ctrlno = $ctrlno->getError();
// CLOSING FMS DB
$fms_db->DBClose();
$msg = null;
if($res_ctrlno > 0){
$url = BASE_URL . V_CONTROLNOEDIT . "edit=1&id=" . $id;
示例8: MessageAlert
}
// -- END EDIT SERVICE TYPE --
// -- START UPDATE SERVICE TYPE --
if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){
$id = $_GET['id'];
$desc = $_POST['txtDescription'];
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET SERVICE TYPE
$servicetype = new Table;
$servicetype->setSQLType($fms_db->getSQLType());
$servicetype->setInstance($fms_db->getInstance());
$servicetype->setTable("servicetypemaster");
$servicetype->setValues("description = '$desc', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$servicetype->setParam("WHERE serviceTypeID = '$id'");
$servicetype->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
$url = BASE_URL . V_SERVICETYPE;
$msg = "Service Type successfully updated.";
$alert = new MessageAlert();
$alert->setURL($url);
$alert->setMessage($msg);
示例9: IN
<?
$id = $_GET['id'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET USER ACCESS
$userassignee = new Table;
$userassignee->setSQLType($fms_db->getSQLType());
$userassignee->setInstance($fms_db->getInstance());
$userassignee->setView("v_userassigneemapper");
$userassignee->setParam("WHERE userID = '$id'");
$userassignee->doQuery("query");
$row_userassignee = $userassignee->getLists();
$num_userassignee = $userassignee->getNumRows();
// SET USER ACCESS
$assigneemst = new Table;
$assigneemst->setSQLType($fms_db->getSQLType());
$assigneemst->setInstance($fms_db->getInstance());
$assigneemst->setView("v_assigneemaster");
$assigneemst->setParam("WHERE assigneeID NOT IN(SELECT assigneeID FROM v_userassigneemapper)");
$assigneemst->doQuery("query");
$row_assigneemst = $assigneemst->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>
示例10: MessageAlert
}
// -- END EDIT LOCATION --
// -- START UPDATE LOCATION --
if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){
$id = $_GET['id'];
$locName = $_POST['txtLocationName'];
$status = $_POST['txtStatus'];
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET LOCATION
$location = new Table;
$location->setSQLType($fms_db->getSQLType());
$location->setInstance($fms_db->getInstance());
$location->setTable("locationmaster");
$location->setValues("locationName = '$locName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
$location->setParam("WHERE locationID = '$id'");
$location->doQuery("update");
// CLOSING FMS DB
$fms_db->DBClose();
$url = BASE_URL . V_LOCATION;
$msg = "Location successfully updated.";
$alert = new MessageAlert();
$alert->setURL($url);
$alert->setMessage($msg);
示例11:
<?
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET MAKE
$invoicing = new Table;
$invoicing->setSQLType($fms_db->getSQLType());
$invoicing->setInstance($fms_db->getInstance());
$invoicing->setView("v_equipmentrepairedmaster");
$invoicing->setParam("WHERE noOfTransactions > 0 ORDER BY companyName ");
$invoicing->doQuery("query");
$row_invoicing = $invoicing->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>
示例12:
<?
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET COMPANY
$companymst = new Table;
$companymst->setSQLType($fms_db->getSQLType());
$companymst->setInstance($fms_db->getInstance());
$companymst->setView("v_companymaster");
$companymst->setParam("ORDER BY companyID");
$companymst->doQuery("query");
$row_companymst = $companymst->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>
示例13:
<?
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET MODEL
$modelmst = new Table;
$modelmst->setSQLType($fms_db->getSQLType());
$modelmst->setInstance($fms_db->getInstance());
$modelmst->setView("v_modelmaster");
$modelmst->setParam("ORDER BY modelID");
$modelmst->doQuery("query");
$row_modelmst = $modelmst->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>
示例14:
<?
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET REMINDERS
$remindersmst = new Table;
$remindersmst->setSQLType($fms_db->getSQLType());
$remindersmst->setInstance($fms_db->getInstance());
$remindersmst->setView("v_remindermaster");
$remindersmst->setParam("WHERE status = '0' ORDER BY reminderID");
$remindersmst->doQuery("query");
$row_remindersmst = $remindersmst->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>
示例15: IN
<?
// SET FMS DB
$fms_db = new DBConfig;
$fms_db->setFleetDB();
// SET USER ACCESS
$usermenu = new Table;
$usermenu->setSQLType($fms_db->getSQLType());
$usermenu->setInstance($fms_db->getInstance());
$usermenu->setView("v_usermenu");
$usermenu->setParam("WHERE userID = '$sys_UserID'");
$usermenu->doQuery("query");
$row_usermenu = $usermenu->getLists();
// SET USER ACCESS
$menumst = new Table;
$menumst->setSQLType($fms_db->getSQLType());
$menumst->setInstance($fms_db->getInstance());
$menumst->setView("v_menumaster");
$menumst->setParam("WHERE menuID NOT IN(SELECT menuID FROM v_usermenu)");
$menumst->doQuery("query");
$row_menumst = $menumst->getLists();
// CLOSING FMS DB
$fms_db->DBClose();
?>