/** * function description * * @param * @return void */ public static function getAll($filter = array()) { global $g_timer; isset($g_timer) && $g_timer->setMarker('mail_log getAll start'); if ($filter['user_id'] > 0) { } $sql = "SELECT * FROM mail_log"; $data = Da_Wrapper::getAll(self::DB_NS, $sql); return $data; }
public static function getpayment($where = "", $isAll = 1) { if ($isAll > 0) { $sql = "SELECT * FROM `payment` " . $where; $ret = Da_Wrapper::getAll(self::DB_NS, $sql); } else { $sql = "SELECT * FROM `payment` " . $where; $ret = Da_Wrapper::getRow(self::DB_NS, $sql); } return $ret; }
/** * 用户分页数据 * @param int $userid 用户id * @param string $condition where 条件 * @param int $limit 过滤条数 * @param int $pageSize 分页大小 */ public static function getListByUser($userid, $condition, $limit, $pageSize = 10) { $sql = "select a.*,p.name as provinceName,c.name as cityName,e.name as arreaName from ht_active a \n\t\t\t\tleft join ht_citys p on p.id = a.province\n\t\t\t\tleft join ht_citys c on c.id = a.city\n\t\t\t\tleft join ht_citys e on e.id = a.arrea\n\t\t\t\twhere a.user_id = {$userid} and {$condition} order by id desc limit {$limit}, {$pageSize}"; $data = Da_Wrapper::getAll(self::DB_NS, $sql); return $data; }