|
@@ -10,11 +10,11 @@
|
|
|
class Table_day_k_base extends Table {
|
|
class Table_day_k_base extends Table {
|
|
|
|
|
|
|
|
protected $base = ""; //分表的后缀日期,在进行数据库操作的时候"Table_day_k_".$base
|
|
protected $base = ""; //分表的后缀日期,在进行数据库操作的时候"Table_day_k_".$base
|
|
|
- protected $table_name = "";//表名,不带前缀,前缀在config中定义
|
|
|
|
|
|
|
+ protected $table_name = "day_k_";//表名,不带前缀,前缀在config中定义
|
|
|
protected $table_id = "day_k_id";//指定ID字段名称,必须
|
|
protected $table_id = "day_k_id";//指定ID字段名称,必须
|
|
|
protected $table_status = '';//指定状态字段名称,如果有
|
|
protected $table_status = '';//指定状态字段名称,如果有
|
|
|
protected $table_order = '';//指定排序字段名称,如果有
|
|
protected $table_order = '';//指定排序字段名称,如果有
|
|
|
- protected $table_fullname = "";//拼接好后表名
|
|
|
|
|
|
|
+ protected $table_fullname = "day_k_";//拼接好后表名 后面拼接日期 day_k_202011
|
|
|
|
|
|
|
|
//数据库结构
|
|
//数据库结构
|
|
|
protected function struct(){
|
|
protected function struct(){
|
|
@@ -49,12 +49,11 @@ class Table_day_k_base extends Table {
|
|
|
* 构造函数,动态获取表的后缀年月
|
|
* 构造函数,动态获取表的后缀年月
|
|
|
* 王刚涛
|
|
* 王刚涛
|
|
|
*/
|
|
*/
|
|
|
- public function __construct() {
|
|
|
|
|
- $this->base=date("Ym");
|
|
|
|
|
- $this->table_name= "day_k_".$this->base;//表名不代前缀
|
|
|
|
|
-// $this->table_fullname= "boniu_"."day_k_".$this->base;//表名代前缀
|
|
|
|
|
- $this->table_fullname= "boniu_day_k_".$this->base;//表名代前缀
|
|
|
|
|
- $this ->createBaseTable();
|
|
|
|
|
|
|
+ public function __construct($date) {
|
|
|
|
|
+ parent::__construct();
|
|
|
|
|
+ $this->table_name .= $date;//表名不代前缀
|
|
|
|
|
+ $this->table_fullname .= $date;//表名代前缀
|
|
|
|
|
+ //$this ->createBaseTable();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/****
|
|
/****
|