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


PHP Table::doQuery方法代码示例

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


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

示例1:

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

	// SET MAKE
	$makemst = new Table;
	$makemst->setSQLType($fms_db->getSQLType());
	$makemst->setInstance($fms_db->getInstance());
	$makemst->setView("v_makemaster");
	$makemst->setParam("ORDER BY makeID");
	$makemst->doQuery("query");
	$row_makemst = $makemst->getLists();

	// CLOSING FMS DB 
	$fms_db->DBClose();
?>
开发者ID:rogerapras,项目名称:fms,代码行数:17,代码来源:makeModel.php

示例2: MessageAlert

	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);
		$alert->Alert();
	}
	// -- END UPDATE MAKE --
?>
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:makeController.php

示例3:

		$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;
			$msg .= "Sorry! There has been an error in updating your control no. Please check the data and update it again.";
		}else{
			$url = BASE_URL . V_CONTROLNO;
			$msg .= "Control No successfully updated.";
		}
开发者ID:rogerapras,项目名称:fms,代码行数:30,代码来源:controlNoController.php

示例4:

			$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)) {
				mkdir($dir, 0777, true);
			}
			if(file_exists($dir . "/" . $oldPhoto)){
				unlink($dir . "/" . $oldPhoto);
			}
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:equipmentController.php

示例5: 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();
?>
开发者ID:rogerapras,项目名称:fms,代码行数:26,代码来源:useraccessModel.php

示例6: MessageAlert

	if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){
		$id = $_GET['id'];
		$catName = $_POST['txtCategoryName'];
		$status = $_POST['txtStatus'];

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

		// SET CATEGORY
		$category = new Table;
		$category->setSQLType($fms_db->getSQLType());
		$category->setInstance($fms_db->getInstance());
		$category->setTable("categorymaster");
		$category->setValues("categoryName = '$catName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$category->setParam("WHERE categoryID = '$id'");
		$category->doQuery("update");

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

		$url = BASE_URL . V_CATEGORY;
		$msg = "Category successfully updated.";

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

示例7: date

		$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();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE REMINDER --
?>
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:remindersController.php

示例8:

<?
	// 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();
?>
开发者ID:rogerapras,项目名称:fms,代码行数:17,代码来源:remindersModel.php

示例9:

<?
	// 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();
?>
开发者ID:rogerapras,项目名称:fms,代码行数:17,代码来源:modelModel.php

示例10: generatePassword

	$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;
	}
?>
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:userModel.php

示例11: MessageAlert

		$variant = $_POST['txtVariant'];
		$variantDesc = $_POST['txtVariantDesc'];
		$status = $_POST['txtStatus'];

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

		// SET MODEL
		$model = new Table;
		$model->setSQLType($fms_db->getSQLType());
		$model->setInstance($fms_db->getInstance());
		$model->setTable("modelmaster");
		$model->setValues("description = '$desc', variant = '$variant', variantDescription = '$variantDesc'
					, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$model->setParam("WHERE modelID = '$id'");
		$model->doQuery("update");

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

		$url = BASE_URL . V_MODEL;
		$msg = "Model successfully updated.";

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

示例12: generatePassword

		}

		// GENERATE NEW PASSWORD ENTERED
		$newpass = generatePassword(strtoupper($new));

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

		// SET USER
		$user = new Table;
		$user->setSQLType($fms_db->getSQLType());
		$user->setInstance($fms_db->getInstance());
		$user->setTable("usermaster");
		$user->setValues("userPass = '$newpass'");
		$user->setParam("WHERE userID = '$id'");
		$user->doQuery("update");

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

		$url = BASE_URL . V_USERCHANGEPASSWORD;
		$msg = "Password successfully changed.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// --END USER CHANGE PASSWORD --
?>
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:userController.php

示例13:

		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET ASSIGNEE
		$assignee = new Table;
		$assignee->setSQLType($fms_db->getSQLType());
		$assignee->setInstance($fms_db->getInstance());
		$assignee->setTable("assigneemaster");
		$assignee->setValues("companyID = '$company',locationID = '$location',firstname = '$fName'
						,lastname = '$lName',gender = '$gender',age = '$age',contactNo1 = '$contactNo1',contactNo2 = '$contactNo2'
						,address = '$address',costCenter = '$costCenter',immediateHead = '$immediateHead'
						,emailAddress = '$immediateEmailAddress', $fAttachment licenseNo = '$licenseNo'
						,expirationDate = '$licenseExpirationDate',licenseAddress = '$licenseAddress'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$assignee->setParam("WHERE assigneeID = '$id'");
		$assignee->doQuery("update");

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

		if($_FILES['txtAttachment']['size'] > 0){
			if (!is_dir($dir)) {
				mkdir($dir, 0777, true);
			}
			if(file_exists($dir . "/" . $oldAttachment)){
				unlink($dir . "/" . $oldAttachment);
			}
			move_uploaded_file($_FILES['txtAttachment']['tmp_name'], $dir . '/' . $attachment);
		}

		$url = BASE_URL . V_ASSIGNEE;
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:assigneeController.php

示例14: MessageAlert

		}

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

		// SET PURCHASE ORDER
		$poreceiving = new Table;
		$poreceiving->setSQLType($fms_db->getSQLType());
		$poreceiving->setInstance($fms_db->getInstance());
		$poreceiving->setTable("poreceiving");
		$poreceiving->setValues("woReferenceNo = '$wo',labor = '$labor',miscellaneous = '$misc',parts = '$parts'
						,discount = '$disc',tax = '$tax',Amount = '$totalCost' $attachment
						,status = '$status'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today'");
		$poreceiving->setParam("WHERE poReferenceNo = '$id'");
		$poreceiving->doQuery("update");
		
		// CLOSING FMS DB
		$fms_db->DBClose();

		$url = BASE_URL . V_PORECEIVINGEDIT . "?edit=1&id=" . $id;
		$msg = "Purchase Order successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE PURCHASE ORDER --
?>
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:poreceivingController.php

示例15: MessageAlert

		$alert->setMessage($msg);
		$alert->Alert();
	}
	if(isset($_GET['user_assignee_remove']) && !empty($_GET['user_assignee_remove']) && $_GET['user_assignee_remove'] == '1'){
		$assigneeid = $_GET['assigneeid'];
		$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("assigneemapper");
		$ins_assignee->setParam("WHERE userID = '$userid' AND assigneeID = '$assigneeid' AND type = 'user_assignee'");
		$ins_assignee->doQuery("delete");

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

		$url = BASE_URL . V_USERASSIGNEE . "?id=" . $userid;
		$msg = "User Assignee was successfully untagged.";

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


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