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


PHP Sys::M方法代码示例

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


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

示例1: save

 static function save($data)
 {
     if (is_array($data)) {
         $data = implode(',', $data);
     }
     return Sys::M(self::$trueTableName)->execute('INSERT INTO ' . self::$trueTableName . '(`goods_id`,`goods_img`,`price`,`discount_price`,`count`,`total_price`,`name`,`order_num`) VALUES' . $data);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:7,代码来源:OrderGoodsModel.class.php

示例2: getIdByActionAndModule

 public static function getIdByActionAndModule($action, $module)
 {
     $action = strtolower($action);
     $module = strtolower($module);
     $data = Sys::M(self::$trueTableName)->select('`id`', '`action`=\'' . $action . '\' AND `module`=\'' . $module . '\'', 1);
     return $data ? $data['id'] : 0;
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:7,代码来源:GlobalRuleModel.class.php

示例3: log

 public static function log($username, $psd, $ip = '')
 {
     if (empty($ip)) {
         Sys::S('core.Server.Ip');
         $ip = Ip::get_client_ip();
     }
     $data = array('username' => addslashes($username), 'psd' => addslashes($psd), 'ip' => bindec(decbin(ip2long($ip))), 'record_time' => NOW);
     return Sys::M(self::$trueTableName)->insert($data);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:9,代码来源:LoginFailLogModel.class.php

示例4: getOrderGoodsInfo

 static function getOrderGoodsInfo($goods_id)
 {
     $data = Sys::M(self::$trueTableName)->select('`logo`,`name`,`price`,`discount_price`', '`id`=' . $goods_id, 1);
     if (empty($data)) {
         $data = array('logo' => 0, 'name' => '', 'price' => 0, 'discount_price' => 0);
     }
     Sys::D('Image');
     $imgData = ImageModel::getImageInfo($data['logo']);
     return array_merge($data, $imgData);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:10,代码来源:StoreGoodsModel.class.php

示例5: getPager

 public function getPager(&$data)
 {
     self::initParam($data);
     $where = self::getWhere($data['condition']);
     isset($data['extWhere']) && ($where = self::getExtWhere($where, $data['extWhere']));
     self::$handle = Sys::M($data['trueTableName']);
     !isset($data['cols']) && ($data['cols'] = '*');
     $total = self::getTotalCount($where);
     $pageCount = ceil($total / self::$pageSize);
     $limit = self::getLimit(self::$PG, self::$pageSize);
     $rs = self::getData($data['cols'], $where, $data['order'], $limit);
     return array('data' => $rs, 'paging' => array('page' => self::$PG, 'totalCount' => $total, 'numberOfPage' => $pageCount));
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:13,代码来源:PageModel.class.php

示例6: sync

 static function sync($date = 'YYmmdd')
 {
     $oM = Sys::M(self::$trueTableName);
     $rs = $oM->select('`num`', '`date`=\'' . $date . '\'', 1);
     if ($rs) {
         $data = array('num' => array('`num`+1', 'ignore'));
         return $oM->update($data, '`date`=\'' . $date . '\'');
     } else {
         $data['date'] = $date;
         $data['num'] = array(1, 'int');
         return $oM->insert($data);
     }
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:13,代码来源:OrderDateStaticModel.class.php

示例7: getLatestLoginInfo

 public static function getLatestLoginInfo($user_id, $action = LOGIN_IN)
 {
     $data = Sys::M(self::$trueTableName)->select('*', '`user_id`=' . $user_id . ' AND `action`=' . $action, 1);
     return $data;
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:AdminLoginLogModel.class.php

示例8: getGlobalRule

 public static function getGlobalRule($group_id)
 {
     $ruleData = Sys::M(self::$trueTableName)->select('g_rules', 'id=' . $group_id, 1);
     return $ruleData ? $ruleData['g_rules'] : '';
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:AuthGroupModel.class.php

示例9: sync

 static function sync($orderNum, $remark)
 {
     $data = array('order_num' => array($orderNum, 'string'), 'remarks' => array($remark, 'string'));
     return Sys::M(self::$trueTableName)->insert($data);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:OrderRemarkModel.class.php

示例10: alterAccountBaseInfo

 static function alterAccountBaseInfo($userId, $email, $mobile)
 {
     $data = array('email' => array($email, 'string'), 'mobile' => array($mobile, 'string'));
     return Sys::M(self::$trueTableName)->update($data, '`id`=' . $userId);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:UcenterMemberModel.class.php

示例11: getInfoByCode

 static function getInfoByCode($code)
 {
     $data = Sys::M(self::$trueTableName)->select('`id`,`code`,`name`,`lat`,`lng`', 'code=\'' . $code . '\'', 1);
     return $data ? $data : array('id' => 0, 'code' => '', 'name' => '未知', 'lat' => 0, 'lng' => 0);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:AreaLnglatModel.class.php

示例12: ifExists

 static function ifExists($fileName)
 {
     $hash = md5_file($fileName);
     $data = Sys::M(self::$trueTableName)->select('`id`', '`hash`=\'' . $hash . '\'', 1);
     return $data ? $data['id'] : 0;
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:6,代码来源:ImageModel.class.php

示例13: ifUnique

 static function ifUnique($val, $table_name, $where)
 {
     $where = sprintf($where, $val);
     $rs = Sys::M($table_name)->select('COUNT(0) AS total', $where, 1);
     return $rs['total'];
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:6,代码来源:InputFilter.class.php

示例14: findStatic

 static function findStatic($storeId, $date = 'Ymd')
 {
     $data = Sys::M(self::$trueTableName)->select('store_id', 'store_id=' . $storeId . ' AND date=\'' . $date . '\'', 1);
     return $data;
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:StoreVisitStaticModel.class.php

示例15: sync

 static function sync($orderNum, $userName, $tel, $address, $zip_code = '')
 {
     $data = array('order_num' => array($orderNum, 'string'), 'userName' => array($userName, 'string'), 'tel' => array($tel, 'string'), 'address' => array($address, 'string'), 'zip_code' => array($zip_code, 'string'));
     return Sys::M(self::$trueTableName)->insert($data);
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:5,代码来源:OrderDeliveryModel.class.php


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