|
@@ -29,7 +29,7 @@ class listsSql { |
|
@@ -29,7 +29,7 @@ class listsSql { |
29
|
*/
|
29
|
*/
|
30
|
public static function lists(string $where, int $p, int $size){
|
30
|
public static function lists(string $where, int $p, int $size){
|
31
|
|
31
|
|
32
|
- $filed = '`id`,`uid`,`msgno`,`subject`,`from`,`from_name`,`to`,`date`,`size`,`recent`,`flagged`,`answered`,`deleted`,`seen`,`draft`,`udate`,`folder_id`,`is_file`,`cc`,`bcc`,`description`,`email_id`';
|
32
|
+ $filed = '`id`,`uid`,`subject`,`from`,`from_name`,`to`,`date`,`size`,`recent`,`flagged`,`answered`,`deleted`,`seen`,`draft`,`udate`,`folder_id`,`is_file`,`cc`,`bcc`,`description`,`email_id`';
|
33
|
|
33
|
|
34
|
return "select {$filed} from `".static::$table."` where ".$where." order by `udate` desc limit {$size} offset ".(($p-1)*$size);
|
34
|
return "select {$filed} from `".static::$table."` where ".$where." order by `udate` desc limit {$size} offset ".(($p-1)*$size);
|
35
|
|
35
|
|
|
@@ -47,17 +47,6 @@ class listsSql { |
|
@@ -47,17 +47,6 @@ class listsSql { |
47
|
return "select count(*) from `".static::$table."` where ".$where;
|
47
|
return "select count(*) from `".static::$table."` where ".$where;
|
48
|
}
|
48
|
}
|
49
|
|
49
|
|
50
|
- /**
|
|
|
51
|
- * 获取最后一条更新的msgno
|
|
|
52
|
- * @param $email_id
|
|
|
53
|
- * @param $folder_id
|
|
|
54
|
- * @return string
|
|
|
55
|
- * @author:dc
|
|
|
56
|
- * @time 2023/2/18 10:01
|
|
|
57
|
- */
|
|
|
58
|
- public static function lastMsgno($email_id,$folder_id):string{
|
|
|
59
|
- return "select max(`msgno`) from `".self::$table."` where ".dbWhere(['email_id'=>$email_id,'folder_id'=>$folder_id])." limit 1";
|
|
|
60
|
- }
|
|
|
61
|
|
50
|
|
62
|
/**
|
51
|
/**
|
63
|
* 获取已有的uid
|
52
|
* 获取已有的uid
|
|
@@ -72,22 +61,6 @@ class listsSql { |
|
@@ -72,22 +61,6 @@ class listsSql { |
72
|
return "select `uid` from `".static::$table."` where ".dbWhere(['email_id'=>$email_id,'folder_id'=>$folder_id,'uid'=>$uids]);
|
61
|
return "select `uid` from `".static::$table."` where ".dbWhere(['email_id'=>$email_id,'folder_id'=>$folder_id,'uid'=>$uids]);
|
73
|
}
|
62
|
}
|
74
|
|
63
|
|
75
|
- /**
|
|
|
76
|
- * 获取已存在的id
|
|
|
77
|
- * @param $email_id
|
|
|
78
|
- * @param $folder_id
|
|
|
79
|
- * @param $msgno
|
|
|
80
|
- * @return string
|
|
|
81
|
- * @author:dc
|
|
|
82
|
- * @time 2023/2/18 10:08
|
|
|
83
|
- */
|
|
|
84
|
- public static function getIds($email_id,$folder_id,$msgno):string {
|
|
|
85
|
- return "select `id`,`msgno` from `".static::$table."` where ".dbWhere([
|
|
|
86
|
- 'email_id' => $email_id,
|
|
|
87
|
- 'folder_id' => $folder_id,
|
|
|
88
|
- 'msgno' => $msgno,
|
|
|
89
|
- ]);
|
|
|
90
|
- }
|
|
|
91
|
|
64
|
|
92
|
/**
|
65
|
/**
|
93
|
* 通过uuid查询id和email_id
|
66
|
* 通过uuid查询id和email_id
|