listsSql.php
710 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Model;
/**
* 邮件列表
* @author:dc
* @time 2023/2/17 14:15
* Class lists
* @package Model
*/
class listsSql {
/**
* 表
* @var string
*/
public static $table = 'lists';
/**
* 查询列表
* @param $email_id
* @param $p
* @param int $folder_id
* @return string
* @author:dc
* @time 2023/2/17 14:42
*/
public static function lists($email_id, $p, $folder_id = null){
$where = ['email_id'=>$email_id];
if($folder_id) $where['folder_id'] = $folder_id;
return "select * from `".static::$table."` where ".dbWhere($where)." order by `udate` desc limit 30 offset ".($p-1);
}
}