當前位置: 首頁>>代碼示例>>PHP>>正文


PHP connection::alreadyExists方法代碼示例

本文整理匯總了PHP中connection::alreadyExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP connection::alreadyExists方法的具體用法?PHP connection::alreadyExists怎麽用?PHP connection::alreadyExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在connection的用法示例。


在下文中一共展示了connection::alreadyExists方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: updateAction

 public function updateAction($params)
 {
     $db = new connection();
     $pk = $params['pk'];
     if ($pk != "") {
         $columns_values = array("exam_type" => $params['exam_type'], "description" => trim($params['description']), "modified_at" => $db->now_time, "modified_by" => $_SESSION['sys_user_id'], "flag" => 0);
         $msg = "";
         if ($db->alreadyExists("Select * from exam_type where flag=0 and exam_type='" . $params['exam_type'] . "' and exam_type_id!=" . $pk)) {
             $res = $db->updateData($this->table_name, $columns_values, " exam_type_id={$pk}");
             if ($res == true) {
                 $msg = "Success";
             } else {
                 $msg = "Failed";
             }
         } else {
             $msg = "Data Already Exists";
         }
     } else {
         $msg = "System Error";
     }
     return $msg;
 }
開發者ID:vktrenga,項目名稱:learn,代碼行數:22,代碼來源:userAccessController.php

示例2: updateAction

 public function updateAction($params)
 {
     $db = new connection();
     $pk = $params['pk'];
     if ($pk != "") {
         $columns_values = array("sys_role_id" => $pk, "sys_role" => $params['sys_role'], "created_at" => $db->now_time, "flag" => 0);
         $msg = "";
         if ($db->alreadyExists("Select * from system_role where sys_role='" . $params['sys_role'] . "' and sys_role_id!=" . $pk)) {
             $res = $db->updateData($this->table_name, $columns_values, " sys_role_id={$pk}");
             if ($res == true) {
                 $msg = "Success";
             } else {
                 $msg = "Failed";
             }
         } else {
             $msg = "Data Already Exists";
         }
     } else {
         $msg = "System Error";
     }
     return $msg;
 }
開發者ID:vktrenga,項目名稱:learn,代碼行數:22,代碼來源:systemRoleController.php

示例3: updateAction

 public function updateAction($params)
 {
     $db = new connection();
     $pk = $params['pk'];
     if ($pk != "") {
         $columns_values = array("sys_name" => $params['sys_name'], "sys_role_id" => $params['sys_role_id'], "dob" => $db->storeDBDate($params['dob']), "email" => $params['email'], "mobile" => $params['mobile'], "address" => $params['address'], "user_name" => $params['user_name'], "modified_by" => $_SESSION['sys_user_id'], "modified_at" => $db->now_time, "flag" => 0);
         $msg = "";
         if ($db->alreadyExists("Select * from system_user where flag=0 and user_name='" . $params['user_name'] . "' and email='" . $params['email'] . "' and sys_user_id!='{$pk}'")) {
             $res = $db->updateData($this->table_name, $columns_values, " sys_user_id={$pk}");
             if ($res == true) {
                 $msg = "Success";
             } else {
                 $msg = "Failed";
             }
         } else {
             $msg = "Data Already Exists";
         }
     } else {
         $msg = "System Error";
     }
     return $msg;
 }
開發者ID:vktrenga,項目名稱:learn,代碼行數:22,代碼來源:systemUserController.php


注:本文中的connection::alreadyExists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。