Procházet zdrojové kódy

修改基本函数

chenbo před 5 roky
rodič
revize
de90f81e27
1 změnil soubory, kde provedl 15 přidání a 11 odebrání
  1. 15 11
      lib/table/table_xrxd_log.class.php

+ 15 - 11
lib/table/table_xrxd_log.class.php

@@ -14,25 +14,29 @@ class Table_xrxd_log extends Table {
     protected $table_id         = 'xrxd_log_id';//指定ID字段名称,必须
     protected $table_status     = '';//指定状态字段名称,如果有
     protected $table_order      = '';//指定排序字段名称,如果有
+
 	//数据库结构
 	protected function struct(){
 		$attr = array();
-		$attr['id']                 = 'xrxd_log_id';
-		$attr['date']               = 'xrxd_log_date';
-		$attr['code']         = 'xrxd_log_code';
-		$attr['type']        = 'xrxd_log_type';
-        $attr['multiple']    = 'xrxd_log_multiple';
-        $attr['subprice']        = 'xrxd_log_subprice';
-        $attr['oldprice']    = 'xrxd_log_oldprice';
-        $attr['newprice']        = 'xrxd_log_newprice';
+		$attr['id']                = 'xrxd_log_id';
+		$attr['date']              = 'xrxd_log_date';
+		$attr['code']              = 'xrxd_log_code';
+        $attr['name']              = 'xrxd_log_name';
+		$attr['type']              = 'xrxd_log_type';
+        $attr['multiple']          = 'xrxd_log_multiple';
+        $attr['subprice']          = 'xrxd_log_subprice';
+
 		return $attr;
 	}
 
     public function add($attr){
         $param = array (
-
-             'admingroup_name'    => array('string', $attr['name'])
-
+            'xrxd_log_date'            => array('number', $attr['date']),
+            'xrxd_log_code'            => array('string', $attr['code']),
+            'xrxd_log_name'            => array('string', $attr['name']),
+            'xrxd_log_type'            => array('string', $attr['type']),
+            'xrxd_log_multiple'        => array('number', $attr['multiple']),
+            'xrxd_log_subprice'        => array('number', $attr['subprice']),
         );
         return $this->pdo->sqlinsert($this->table_fullname, $param);
     }