예제 #1
0
 function act_getTNameCount($tName, $where)
 {
     $ret = WhIoStoreModel::getTNameCount($tName, $where);
     if ($ret !== false) {
         return $ret;
     } else {
         self::$errCode = WhIoStoreModel::$errCode;
         self::$errMsg = WhIoStoreModel::$errMsg;
         return false;
     }
 }
예제 #2
0
 function act_getTNameCount()
 {
     $jsonArr = isset($_GET['jsonArr']) ? $_GET['jsonArr'] : '';
     //传过来的base64编码的json字符串
     if (empty($jsonArr)) {
         self::$errCode = 101;
         self::$errMsg = '参数数组为空';
         return false;
     }
     $jsonArr = json_decode(base64_decode($jsonArr), true);
     //对base64及json解码
     if (!is_array($jsonArr)) {
         self::$errCode = 103;
         self::$errMsg = '参数数组不是数组格式';
         return false;
     }
     $tName = $jsonArr['tName'];
     //表名
     $where = $jsonArr['where'];
     //where,要带上关键字WHERE
     if (empty($tName) || empty($where)) {
         self::$errCode = '300';
         self::$errMsg = '必要参数不完整';
         return false;
     }
     $count = WhIoStoreModel::getTNameCount($tName, $where);
     if ($count !== false) {
         self::$errCode = '200';
         self::$errMsg = '成功';
         return $count;
     } else {
         self::$errCode = '404';
         self::$errMsg = '数据库操作错误';
         return false;
     }
 }