正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -45,7 +45,7 @@ class folderSql { | @@ -45,7 +45,7 @@ class folderSql { | ||
45 | */ | 45 | */ |
46 | public static function first(array|string|int $where,$filed = '*'):string { | 46 | public static function first(array|string|int $where,$filed = '*'):string { |
47 | $where = is_numeric($where) ? ['id'=>$where] : $where; | 47 | $where = is_numeric($where) ? ['id'=>$where] : $where; |
48 | - return "select {$filed} from `".self::$table."` where ".dbWhere($where)." limit 1"; | 48 | + return "select {$filed} from `".self::$table."` where ".dbWhere($where)." order by `id` desc limit 1"; |
49 | } | 49 | } |
50 | 50 | ||
51 | /** | 51 | /** |
@@ -57,7 +57,7 @@ class folderSql { | @@ -57,7 +57,7 @@ class folderSql { | ||
57 | * @time 2023/5/8 11:01 | 57 | * @time 2023/5/8 11:01 |
58 | */ | 58 | */ |
59 | public static function originFolder(int $email_id,string $folder){ | 59 | public static function originFolder(int $email_id,string $folder){ |
60 | - return "select `origin_folder` from `".static::$table."` where `email_id` = {$email_id} and `folder` = '{$folder}' limit 1"; | 60 | + return "select `origin_folder` from `".static::$table."` where `email_id` = {$email_id} and `folder` = '{$folder}' order by `id` desc limit 1"; |
61 | } | 61 | } |
62 | 62 | ||
63 | } | 63 | } |
-
请 注册 或 登录 后发表评论