Banner.php
907 Bytes
<?php
namespace YHMSupport\SqlMap\Banner;
class Banner {
const INSERT_BANNER = 'INSERT INTO banner(banner_pic, banner_url, banner_describe, banner_type, banner_val, status, create_time) VALUES
(:banner_pic,:banner_url, :banner_describe, :banner_type,:banner_val, :status, UNIX_TIMESTAMP())';
const UPDATE_BANNER = 'UPDATE banner SET banner_pic = :banner_pic, banner_url = :banner_url, banner_describe = :banner_describe,
banner_type = :banner_type, banner_val = :banner_val, status = :status, create_time = UNIX_TIMESTAMP() WHERE id = :id';
const GET_BANNER_BY_TYPE = 'SELECT * FROM banner WHERE banner_type = :banner_type AND banner_val = :banner_val AND status = :status ORDER BY id DESC';
const GET_BANNER_LIST = 'SELECT * FROM banner';
const UPDATE_BANNER_STATUS = 'UPDATE banner SET status = :status WHERE id = :id';
const GET_BANNER = 'SELECT * FROM banner WHERE id = :id';
}