comment_data_model.class.php 576 B

12345678910111213141516171819202122
  1. <?php
  2. defined('IN_PHPCMS') or exit('No permission resources.');
  3. pc_base::load_sys_class('model', '', 0);
  4. class comment_data_model extends model {
  5. public $table_name;
  6. public function __construct() {
  7. $this->db_config = pc_base::load_config('database');
  8. $this->db_setting = 'comment';
  9. $this->table_name = '';
  10. parent::__construct();
  11. }
  12. /**
  13. * 设置评论数据表
  14. * @param integer $id 数据表ID
  15. */
  16. public function table_name($id) {
  17. $this->table_name = $this->db_config[$this->db_setting]['tablepre'].'comment_data_'.$id;
  18. return $this->table_name;
  19. }
  20. }
  21. ?>