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


PHP Table::getError方法代码示例

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


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

示例1: MessageAlert

	// -- START DELETE MAKE --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE MAKE
		$del_make = new Table;
		$del_make->setSQLType($fms_db->getSQLType());
		$del_make->setInstance($fms_db->getInstance());
		$del_make->setTable("makemaster");
		$del_make->setParam("WHERE makeID = '$id'");
		$del_make->doQuery("delete");
		$res_make = $del_make->getError();

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

		$msg = null;
		if($res_make > 0){
			$msg .= "Sorry! There has been an error in deleting your Make. Please contact the Web Administrator.";
		}else{
			$msg .= "Make successfully deleted.";
		}

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

示例2: MessageAlert

		// 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.";
		}

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

示例3:

		$equipmentmst = new Table;
		$equipmentmst->setSQLType($fms_db->getSQLType());
		$equipmentmst->setInstance($fms_db->getInstance());
		$equipmentmst->setView("v_equipmentmaster");
		$equipmentmst->setParam("WHERE equipmentID = '$id'");
		$equipmentmst->doQuery("query");
		$row_equipmentmst = $equipmentmst->getLists();

		// DELETE EQUIPMENT
		$del_equipment = new Table;
		$del_equipment->setSQLType($fms_db->getSQLType());
		$del_equipment->setInstance($fms_db->getInstance());
		$del_equipment->setTable("equipmentmaster");
		$del_equipment->setParam("WHERE equipmentID = '$id'");
		$del_equipment->doQuery("delete");
		$res_equipment = $del_equipment->getError();

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

		$dir = EQUIPMENTPICS . $id;

		if(file_exists($dir . "/" . $row_equipmentmst[0]['photo'])){
			unlink($dir . "/" . $row_equipmentmst[0]['photo']);
			rmdir($dir);
		}

		$msg = null;
		if($res_equipment > 0){
			$msg .= "Sorry! There has been an error in deleting your Equipment. Please contact the Web Administrator.";
		}else{
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:equipmentController.php

示例4: MessageAlert

	// -- START DELETE SUPPLIER --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE SUPPLIER
		$del_supplier = new Table;
		$del_supplier->setSQLType($fms_db->getSQLType());
		$del_supplier->setInstance($fms_db->getInstance());
		$del_supplier->setTable("suppliermaster");
		$del_supplier->setParam("WHERE supplierID = '$id'");
		$del_supplier->doQuery("delete");
		$res_category = $del_supplier->getError();

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

		$msg = null;
		if($res_category > 0){
			$msg .= "Sorry! There has been an error in deleting your Supplier. Please contact the Web Administrator.";
		}else{
			$msg .= "Supplier successfully deleted.";
		}

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

示例5: MessageAlert

	// -- START DELETE REMINDER --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE REMINDER
		$del_rem = new Table;
		$del_rem->setSQLType($fms_db->getSQLType());
		$del_rem->setInstance($fms_db->getInstance());
		$del_rem->setTable("remindermaster");
		$del_rem->setParam("WHERE reminderID = '$id'");
		$del_rem->doQuery("delete");
		$res_del_rem = $del_rem->getError();

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

		$msg = null;
		if($res_parts > 0){
			$msg .= "Sorry! There has been an error in deleting your Reminder. Please contact the Web Administrator.";
		}else{
			$msg .= "Reminder successfully deleted.";
		}

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

示例6:

		$getwo = new Table;
		$getwo->setSQLType($fms_db->getSQLType());
		$getwo->setInstance($fms_db->getInstance());
		$getwo->setView("v_workordermaster");
		$getwo->setParam("WHERE woReferenceNo = '$id'");
		$getwo->doQuery("query");
		$row_getwo = $getwo->getLists();

		// DELETE WORKORDER MST
		$del_womst = new Table;
		$del_womst->setSQLType($fms_db->getSQLType());
		$del_womst->setInstance($fms_db->getInstance());
		$del_womst->setTable("workordermaster");
		$del_womst->setParam("WHERE woReferenceNo = '$id'");
		$del_womst->doQuery("delete");
		$res_wo = $del_womst->getError();

		// DELETE WORKORDER DTL
		$del_wodtl = new Table;
		$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");

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

		$msg = null;
		if($res_wo > 0){
			$msg .= "Sorry! There has been an error in deleting your Work Order. Please contact the Web Administrator.";
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:workorderController.php

示例7: MessageAlert

	// -- START DELETE SERVICE TYPE --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE SERVICE TYPE
		$del_servicetype = new Table;
		$del_servicetype->setSQLType($fms_db->getSQLType());
		$del_servicetype->setInstance($fms_db->getInstance());
		$del_servicetype->setTable("servicetypemaster");
		$del_servicetype->setParam("WHERE serviceTypeID = '$id'");
		$del_servicetype->doQuery("delete");
		$res_servicetype = $del_servicetype->getError();

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

		$msg = null;
		if($res_servicetype > 0){
			$msg .= "Sorry! There has been an error in deleting your Service Type. Please contact the Web Administrator.";
		}else{
			$msg .= "Service Type successfully deleted.";
		}

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

示例8: MessageAlert

	// -- START DELETE CATEGORY --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE CATEGORY
		$del_category = new Table;
		$del_category->setSQLType($fms_db->getSQLType());
		$del_category->setInstance($fms_db->getInstance());
		$del_category->setTable("categorymaster");
		$del_category->setParam("WHERE categoryID = '$id'");
		$del_category->doQuery("delete");
		$res_category = $del_category->getError();

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

		$msg = null;
		if($res_category > 0){
			$msg .= "Sorry! There has been an error in deleting your Category. Please contact the Web Administrator.";
		}else{
			$msg .= "Category successfully deleted.";
		}

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

示例9: MessageAlert

	// -- START DELETE MODEL --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE MODEL
		$del_model = new Table;
		$del_model->setSQLType($fms_db->getSQLType());
		$del_model->setInstance($fms_db->getInstance());
		$del_model->setTable("modelmaster");
		$del_model->setParam("WHERE modelID = '$id'");
		$del_model->doQuery("delete");
		$res_model = $del_model->getError();

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

		$msg = null;
		if($res_model > 0){
			$msg .= "Sorry! There has been an error in deleting your Model. Please contact the Web Administrator.";
		}else{
			$msg .= "Model successfully deleted.";
		}

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

示例10: MessageAlert

	// -- START DELETE LOCATION --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE LOCATION
		$del_location = new Table;
		$del_location->setSQLType($fms_db->getSQLType());
		$del_location->setInstance($fms_db->getInstance());
		$del_location->setTable("locationmaster");
		$del_location->setParam("WHERE locationID = '$id'");
		$del_location->doQuery("delete");
		$res_location = $del_location->getError();

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

		$msg = null;
		if($res_location > 0){
			$msg .= "Sorry! There has been an error in deleting your Location. Please contact the Web Administrator.";
		}else{
			$msg .= "Location successfully deleted.";
		}

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

示例11: strtoupper

		$getuser = new Table;
		$getuser->setSQLType($fms_db->getSQLType());
		$getuser->setInstance($fms_db->getInstance());
		$getuser->setView("v_usermaster");
		$getuser->setParam("WHERE userID = '$id'");
		$getuser->doQuery("query");
		$row_getuser = $getuser->getLists();

		// DELETE USER
		$del_user = new Table;
		$del_user->setSQLType($fms_db->getSQLType());
		$del_user->setInstance($fms_db->getInstance());
		$del_user->setTable("usermaster");
		$del_user->setParam("WHERE userID = '$id'");
		$del_user->doQuery("delete");
		$res_user = $del_user->getError();

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

		$msg = null;
		if($res_user > 0){
			$msg .= "Sorry! There has been an error in deleting your User. Please contact the Web Administrator.";
		}else{
			$dir = USERPICS . strtoupper($id);
			
			unlink($dir . "/" . $row_getuser[0]['userPic']);
			rmdir($dir);
			$msg .= "User successfully deleted.";
		}
开发者ID:rogerapras,项目名称:fms,代码行数:30,代码来源:userController.php

示例12:

		$assignee = new Table;
		$assignee->setSQLType($fms_db->getSQLType());
		$assignee->setInstance($fms_db->getInstance());
		$assignee->setView("v_assigneemaster");
		$assignee->setParam("WHERE assigneeID = '$id'");
		$assignee->doQuery("query");
		$row_assignee = $assignee->getLists();

		// DELETE ASSIGNEE
		$del_assignee = new Table;
		$del_assignee->setSQLType($fms_db->getSQLType());
		$del_assignee->setInstance($fms_db->getInstance());
		$del_assignee->setTable("assigneemaster");
		$del_assignee->setParam("WHERE assigneeID = '$id'");
		$del_assignee->doQuery("delete");
		$res_assignee = $del_assignee->getError();

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

		$dir = ASSIGNEEATTACHMENTS . $id;

		if(file_exists($dir . "/" . $row_assignee[0]['attachment'])){
			unlink($dir . "/" . $row_assignee[0]['attachment']);
			rmdir($dir);
		}

		$msg = null;
		if($res_assignee > 0){
			$msg .= "Sorry! There has been an error in deleting your Assignee. Please contact the Web Administrator.";
		}else{
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:assigneeController.php

示例13: MessageAlert

		$getpo = new Table;
		$getpo->setSQLType($fms_db->getSQLType());
		$getpo->setInstance($fms_db->getInstance());
		$getpo->setView("v_poreceiving");
		$getpo->setParam("WHERE poReferenceNo = '$id'");
		$getpo->doQuery("query");
		$row_getpo = $getpo->getLists();
		
		// DELETE WORKORDER
		$del_po = new Table;
		$del_po->setSQLType($fms_db->getSQLType());
		$del_po->setInstance($fms_db->getInstance());
		$del_po->setTable("poreceiving");
		$del_po->setParam("WHERE poReferenceNo = '$id'");
		$del_po->doQuery("delete");
		$res_po = $del_po->getError();

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

		if(count($row_getpo) == 0){
			$alert = new MessageAlert();
			$alert->setURL(BASE_URL . V_PORECEIVING);
			$alert->setMessage("Invalid URL!");
			$alert->Alert();
		}

		$dirPOAttachment = POATTACHMENTS . $id;

		if(file_exists($dirPOAttachment . "/" . $row_getpo[0]['attachment'])){
			unlink($dirPOAttachment . "/" . $row_getpo[0]['attachment']);
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:poreceivingController.php

示例14: MessageAlert

	// -- START DELETE PARTS --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE PARTS
		$del_parts = new Table;
		$del_parts->setSQLType($fms_db->getSQLType());
		$del_parts->setInstance($fms_db->getInstance());
		$del_parts->setTable("partsmaster");
		$del_parts->setParam("WHERE partsID = '$id'");
		$del_parts->doQuery("delete");
		$res_parts = $del_parts->getError();

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

		$msg = null;
		if($res_parts > 0){
			$msg .= "Sorry! There has been an error in deleting your Parts. Please contact the Web Administrator.";
		}else{
			$msg .= "Parts successfully deleted.";
		}

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

示例15: MessageAlert

	// -- START DELETE MENU --
	if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){
		$id = $_GET['id'];

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

		// DELETE MENU
		$del_menu = new Table;
		$del_menu->setSQLType($fms_db->getSQLType());
		$del_menu->setInstance($fms_db->getInstance());
		$del_menu->setTable("menumaster");
		$del_menu->setParam("WHERE menuID = '$id'");
		$del_menu->doQuery("delete");
		$res_menu = $del_menu->getError();

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

		$msg = null;
		if($res_menu > 0){
			$msg .= "Sorry! There has been an error in deleting your Menu. Please contact the Web Administrator.";
		}else{
			$msg .= "Menu successfully deleted.";
		}

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


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