<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
class table_jsjpay extends discuz_table{
	public function __construct() {

			$this->_table = 'jsjpay';
			$this->_pk    = 'id';

			parent::__construct();

        }
	public function count_by_uid($uid){
		$s = intval($uid);
		return DB::result_first('select count(*) from %t where uid like %s',array($this->_table,$s));
        }
        public function fetch_all_by_uid($uid,$start,$perpage){
		$s = intval($uid);
		return DB::fetch_all('select * from %t where uid like %s order by time desc limit %d,%d',array($this->_table,$s,$start,$perpage));
        }

	public function count_by_num($addnum){
		$s="%".addcslashes($addnum, '%_')."%";
		return DB::result_first('select count(*) from %t where addnum like %s',array($this->_table,$s));
        }
}

?>