当前位置: 首页>>代码示例>>PHP>>正文


PHP Table::setField方法代码示例

本文整理汇总了PHP中Table::setField方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setField方法的具体用法?PHP Table::setField怎么用?PHP Table::setField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table::setField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getnewCtrlNo

		$companyid = $_GET['companyid'];


		// NEW NO FOR ASSIGNEE COMPANY
		$newNum = getnewCtrlNo("assignee_company");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW USER MENU
		$ins_assigneecompany = new Table;
		$ins_assigneecompany->setSQLType($fms_db->getSQLType());
		$ins_assigneecompany->setInstance($fms_db->getInstance());
		$ins_assigneecompany->setTable("assigneemapper");
		$ins_assigneecompany->setField("id,companyID,assigneeID,type,createdBy,createdDate");
		$ins_assigneecompany->setValues("'$newNum','$companyid','$assigneeid','assignee_company','$sys_UserID','$today'");
		$ins_assigneecompany->doQuery("save");
		
		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO
		UpdateCtrlNo("assignee_company");

		$url = BASE_URL . V_ASSIGNEECOMPANY . "?id=" . $assigneeid;
		$msg = "Company was successfully tagged to Assignee.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:assigneecompanyController.php

示例2:

						,insuranceAppliedDate = '$insuranceAppliedDate',insuranceExpirationDate = '$insuranceExpirationDate'
						,insuranceReminderInDays = '$insuranceReminderInDays',purchaseDate = '$purchaseDate'
						,conductionSticker = '$conductionSticker',year = '$year',plateNo = '$plateNo',engineNo = '$engineNo'
						,chassisNo = '$chassisNo',serialNo = '$serialNo',acquisitionCost = '$acquisitionCost'
						,insuranceCost = '$insuranceCost',registrationCost = '$registrationCost',depresitionValue = '$depresitionValue'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$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();
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:equipmentController.php

示例3: getNewCtrlNo

		$suppEmailAddress = $_POST['txtSupplierEmailAddress'];
		$suppContactNo = $_POST['txtSupplierContactNo'];
		$suppContactPerson = $_POST['txtSupplierContactPerson'];
		$suppTIN = $_POST['txtSupplierTIN'];
		$newNum = getNewCtrlNo("supplier");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW SUPPLIER
		$ins_category = new Table;
		$ins_category->setSQLType($fms_db->getSQLType());
		$ins_category->setInstance($fms_db->getInstance());
		$ins_category->setTable("suppliermaster");
		$ins_category->setField("supplierID,supplierName,supplierAddress,supplierEmailAddress,supplierContactNo,contactPerson
							,TIN,createdBy,createdDate");
		$ins_category->setValues("'$newNum','$suppName','$suppAddress','$suppEmailAddress','$suppContactNo','$suppContactPerson'
							,'$suppTIN','$sys_UserID','$today'");
		$ins_category->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO SUPPLIER
		UpdateCtrlNo("supplier");

		$url = BASE_URL . V_SUPPLIER;
		$msg = "New Supplier successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:supplierController.php

示例4: date

		$category = $_POST['txtCategory'];
		$desc = $_POST['txtDescription'];
		$startDate = $_POST['txtStartDate'] . ' ' . date("h:i:s");
		$dueDate = $_POST['txtDueDate']  . ' ' . date("h:i:s");
		$newNum = getNewCtrlNo("reminder");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW REMINDER
		$ins_reminder = new Table;
		$ins_reminder->setSQLType($fms_db->getSQLType());
		$ins_reminder->setInstance($fms_db->getInstance());
		$ins_reminder->setTable("remindermaster");
		$ins_reminder->setField("reminderID,title,description,location,category,startDate,dueDate
							,createdBy,createdDate");
		$ins_reminder->setValues("'$newNum','$title','$desc','$location','$category','$startDate','$dueDate'
							,'$sys_UserID','$today'");
		$ins_reminder->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO REMINDER
		UpdateCtrlNo("reminder");

		$url = BASE_URL . V_REMINDERS;
		$msg = "New Reminder successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:remindersController.php

示例5: explode

		$del_wodtl->setSQLType($fms_db->getSQLType());
		$del_wodtl->setInstance($fms_db->getInstance());
		$del_wodtl->setTable("workorderdetail");
		$del_wodtl->setParam("WHERE woReferenceNo = '$id'");
		$del_wodtl->doQuery("delete");

		// SAVE NEW WORK ORDER DTL
		if(!empty($arrParts)){
			$partsItem = explode("|",$arrParts);
			for($i=0;$i<count($partsItem);$i++){
				$pItem = explode("::",$partsItem[$i]);
				$ins_wodtl = new Table;
				$ins_wodtl->setSQLType($fms_db->getSQLType());
				$ins_wodtl->setInstance($fms_db->getInstance());
				$ins_wodtl->setTable("workorderdetail");
				$ins_wodtl->setField("woReferenceNo,partsID,partsPrice,qty");
				$ins_wodtl->setValues("'$id','$pItem[0]','$pItem[3]','$pItem[4]'");
				$ins_wodtl->doQuery("save");

				// $sql .= "INSERT INTO workorderdetail(woReferenceNo,partsID,partsPrice,qty)
				// 		VALUES('$newNum','$pItem[0]','$pItem[3]','$pItem[4]'); ";
			}
		}

		// SET WORK ORDER
		$getWorkOrder = new Table;
		$getWorkOrder->setSQLType($fms_db->getSQLType());
		$getWorkOrder->setInstance($fms_db->getInstance());
		$getWorkOrder->setView("v_workordermaster");
		$getWorkOrder->setParam("WHERE woReferenceNo = '$id'");
		$getWorkOrder->doQuery("query");
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:workorderController.php

示例6: MessageAlert

<?
	if(isset($_GET['user_access_add']) && !empty($_GET['user_access_add']) && $_GET['user_access_add'] == '1'){
		$menuid = $_GET['menuid'];
		$userid = $_GET['userid'];

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW USER MENU
		$ins_assignee = new Table;
		$ins_assignee->setSQLType($fms_db->getSQLType());
		$ins_assignee->setInstance($fms_db->getInstance());
		$ins_assignee->setTable("usermenu");
		$ins_assignee->setField("userID,menuID,createdBy,createdDate");
		$ins_assignee->setValues("'$userid','$menuid','$sys_UserID','$today'");
		$ins_assignee->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		$url = BASE_URL . V_USERACCESS . "?id=" . $userid;
		$msg = "Menu was successfully added.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	if(isset($_GET['user_access_remove']) && !empty($_GET['user_access_remove']) && $_GET['user_access_remove'] == '1'){
		$menuid = $_GET['menuid'];
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:useraccessController.php

示例7: getNewCtrlNo

<?
	// -- START SAVE NEW CATEGORY --
	if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){
		$catName = $_POST['txtCategoryName'];
		$newNum = getNewCtrlNo("category");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW CATEGORY
		$ins_category = new Table;
		$ins_category->setSQLType($fms_db->getSQLType());
		$ins_category->setInstance($fms_db->getInstance());
		$ins_category->setTable("categorymaster");
		$ins_category->setField("categoryID,categoryName,createdBy,createdDate");
		$ins_category->setValues("'$newNum','$catName','$sys_UserID','$today'");
		$ins_category->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO CATEGORY
		UpdateCtrlNo("category");

		$url = BASE_URL . V_CATEGORY;
		$msg = "New Category successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:categoryController.php

示例8: getNewCtrlNo

<?
	// -- START SAVE NEW LOCATION --
	if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){
		$locName = $_POST['txtLocationName'];
		$newNum = getNewCtrlNo("location");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW LOCATION
		$ins_location = new Table;
		$ins_location->setSQLType($fms_db->getSQLType());
		$ins_location->setInstance($fms_db->getInstance());
		$ins_location->setTable("locationmaster");
		$ins_location->setField("locationID,locationName,createdBy,createdDate");
		$ins_location->setValues("'$newNum','$locName','$sys_UserID','$today'");
		$ins_location->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO LOCATION
		UpdateCtrlNo("location");

		$url = BASE_URL . V_LOCATION;
		$msg = "New Location successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:locationController.php

示例9: getNewCtrlNo

<?
	// -- START SAVE NEW SERVICE TYPE --
	if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){
		$desc = $_POST['txtDescription'];
		$newNum = getNewCtrlNo("service_type");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW SERVICE TYPE
		$ins_servicetype = new Table;
		$ins_servicetype->setSQLType($fms_db->getSQLType());
		$ins_servicetype->setInstance($fms_db->getInstance());
		$ins_servicetype->setTable("servicetypemaster");
		$ins_servicetype->setField("serviceTypeID,description,createdBy,createdDate");
		$ins_servicetype->setValues("'$newNum','$desc','$sys_UserID','$today'");
		$ins_servicetype->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO SERVICE TYPE
		UpdateCtrlNo("service_type");

		$url = BASE_URL . V_SERVICETYPE;
		$msg = "New Service Type successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:servicetypeController.php

示例10:

		$chk_user = new Table;
		$chk_user->setSQLType($fms_db->getSQLType());
		$chk_user->setInstance($fms_db->getInstance());
		$chk_user->setView("v_usermaster");
		$chk_user->setParam("WHERE userID = '$userID'");
		$chk_user->doQuery("query");
		$num_chkuser = $chk_user->getNumRows();

		if($num_chkuser == 0){
			// SAVE NEW USER
			$ins_user = new Table;
			$ins_user->setSQLType($fms_db->getSQLType());
			$ins_user->setInstance($fms_db->getInstance());
			$ins_user->setTable("usermaster");
			$ins_user->setField("userID,userPass,firstname,lastname,userType,accessLevel,userPic,createdBy,createdDate");
			$ins_user->setValues("'$userID','$password','$fName','$lName','$userType','$accessLvl','$fileName','$sys_UserID','$today'");
			$ins_user->doQuery("save");

			if($_FILES['txtUserPic']['size'] > 0){
				if (!file_exists($dir . "/" . $fileName)) {
					mkdir($dir, 0777, true);
				}
				move_uploaded_file($_FILES['txtUserPic']['tmp_name'], $dir . '/' . $fileName);
			}

			$url = BASE_URL . V_USER;
			$msg = "New User successfully saved.";
		}else{
			$url = BASE_URL . V_USERADD;
			$msg = "Sorry! User ID is already existed. Please enter an unexisted user ID.";
开发者ID:rogerapras,项目名称:fms,代码行数:30,代码来源:userController.php

示例11: getNewCtrlNo

	if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){
		$desc = $_POST['txtDescription'];
		$variant = $_POST['txtVariant'];
		$variantDesc = $_POST['txtVariantDesc'];
		$newNum = getNewCtrlNo("model");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW MODEL
		$ins_make = new Table;
		$ins_make->setSQLType($fms_db->getSQLType());
		$ins_make->setInstance($fms_db->getInstance());
		$ins_make->setTable("modelmaster");
		$ins_make->setField("modelID,description,variant,variantDescription,createdBy,createdDate");
		$ins_make->setValues("'$newNum','$desc','$variant','$variantDesc','$sys_UserID','$today'");
		$ins_make->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO MODEL
		UpdateCtrlNo("model");

		$url = BASE_URL . V_MODEL;
		$msg = "New Model successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:modelController.php

示例12: getNewCtrlNo

		$licenseAddress = $_POST['txtLicenseAddress'];
		$newNum = getNewCtrlNo("assignee");

		$dir = ASSIGNEEATTACHMENTS . $newNum;

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW ASSIGNEE
		$ins_assignee = new Table;
		$ins_assignee->setSQLType($fms_db->getSQLType());
		$ins_assignee->setInstance($fms_db->getInstance());
		$ins_assignee->setTable("assigneemaster");
		$ins_assignee->setField("assigneeID,companyID,locationID,firstname,lastname,gender,age,contactNo1,contactNo2,address
							,costCenter,immediateHead,emailAddress,attachment,licenseNo,expirationDate,licenseAddress
							,createdBy,createdDate");
		$ins_assignee->setValues("'$newNum','$company','$location','$fName','$lName','$gender','$age','$contactNo1','$contactNo2'
							,'$address','$costCenter','$immediateHead','$immediateEmailAddress','$attachment','$licenseNo'
							,'$licenseExpirationDate','$licenseAddress'
							,'$sys_UserID','$today'");
		$ins_assignee->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO ASSIGNEE
		UpdateCtrlNo("assignee");

		if($_FILES['txtAttachment']['size'] > 0){
			if (!file_exists($dir . "/" . $attachment)) {
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:assigneeController.php

示例13:

		}else{
			$attachmentfld = null;
			$attachmentval = null;
		}

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW PURCHSE ORDER
		$ins_po = new Table;
		$ins_po->setSQLType($fms_db->getSQLType());
		$ins_po->setInstance($fms_db->getInstance());
		$ins_po->setTable("poreceiving");
		$ins_po->setField("poReferenceNo,woReferenceNo,poTransactionDate
							,labor,miscellaneous,parts,discount,tax,Amount
							$attachmentfld
							,createdBy,createdDate");
		$ins_po->setValues("'$newNum','$wo','$today'
							,'$labor','$misc','$parts','$disc','$tax','$totalCost'
							$attachmentval
							,'$sys_UserID','$today'");
		$ins_po->doQuery("save");

		// CLOSING PURCHSE DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO PURCHSE ORDER
		UpdateCtrlNo("po_receiving");

		if($_FILES['txtAttachment']['size'] > 0){
			if (!file_exists($dirPOAttachment . "/" . $attachment)) {
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:poreceivingController.php

示例14: getNewCtrlNo

		$stockOnHand = str_replace(",","",$_POST['txtStockOnHand']);
		$lowStockQty = str_replace(",","",$_POST['txtLowStockQty']);
		$price = str_replace(",","",$_POST['txtPrice']);
		$retailPrice = str_replace(",","",$_POST['txtRetailPrice']);
		$newNum = getNewCtrlNo("parts");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW PARTS
		$ins_parts = new Table;
		$ins_parts->setSQLType($fms_db->getSQLType());
		$ins_parts->setInstance($fms_db->getInstance());
		$ins_parts->setTable("partsmaster");
		$ins_parts->setField("partsID,stockCode,brand,model,description,stockOnHand,lowStockQty,price,retailPrice
							,createdBy,createdDate");
		$ins_parts->setValues("'$newNum','$stockCode','$brand','$model','$desc','$stockOnHand','$lowStockQty','$price','$retailPrice'
							,'$sys_UserID','$today'");
		$ins_parts->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO PARTS
		UpdateCtrlNo("parts");

		$url = BASE_URL . V_PARTS;
		$msg = "New Parts successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:partsController.php

示例15: getNewCtrlNo

<?
	// -- START SAVE NEW MAKE --
	if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){
		$makeName = $_POST['txtMakeName'];
		$newNum = getNewCtrlNo("make");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW MAKE
		$ins_make = new Table;
		$ins_make->setSQLType($fms_db->getSQLType());
		$ins_make->setInstance($fms_db->getInstance());
		$ins_make->setTable("makemaster");
		$ins_make->setField("makeID,makeName,createdBy,createdDate");
		$ins_make->setValues("'$newNum','$makeName','$sys_UserID','$today'");
		$ins_make->doQuery("save");

		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO MAKE
		UpdateCtrlNo("make");

		$url = BASE_URL . V_MAKE;
		$msg = "New Make successfully saved.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:makeController.php


注:本文中的Table::setField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。