function Modify($field,$value){ $SQL="UPDATE FROM ".$this->Table." SET ".$field."=".$value." ".$this->Condition; mysql_query($SQL) or die(mysql_error()); }
//**********显示页数************* //显示当前页及总页数
function ThePage() { $this->TPages=ceil($this->Total/$this->MaxLine); $this->CPages=$this->Offset/$this->MaxLine+1; echo "第".$this->CPages."页/共".$this->TPages."页"; }
# -------------------------------------------------------- # Table structure for table 'reply' # id,商品id,出价人,出价人的email,出价。
CREATE TABLE reply ( id varchar(16) NOT NULL, parentid varchar(16) NOT NULL, buyer varchar(12) NOT NULL, email varchar(32) NOT NULL, price float(10,2) DEFAULT '0.00' NOT NULL, PRIMARY KEY (id, price) );
# -------------------------------------------------------- # Table structure for table 'shop' # id,商品名,介绍,原始价,加价单位,结束时间,竞标数,当前价,是否有照片
CREATE TABLE shop ( id varchar(16) NOT NULL, name varchar(50) NOT NULL, description text, price float(10,2) DEFAULT '0.00' NOT NULL, unit tinyint(2) unsigned NOT NULL, endtime varchar(16) DEFAULT '0000-00-00 00:00' NOT NULL, reply int(4) unsigned NOT NULL, curprice float(10,2) DEFAULT '0.00' NOT NULL, photo tinyint(1) unsigned NOT NULL, PRIMARY KEY (id), KEY kreply (reply) );