当前位置: 首页>>代码示例>>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;未经允许,请勿转载。