listsSql.php 710 字节
<?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);

    }





}