扩展 CodeIgniter 1.6.3 的 Model
第一步,用下载的文件替换system/libraries/Model.php
第二步,对于你的每个数据表,都要在system/application/models 下建立一个模型
第三步,建立一个“products”表,如下所示:
CREATE TABLE products (
id int(11) NOT NULL auto_increment,
title varchar(50) NOT NULL,
description text NOT NULL,
color varchar(20) NOT NULL,
price float NOT NULL,
category_id int(11) NOT NULL,
featured char(1) NOT NULL,
enabled char(1) NOT NULL,
visits int(1) NOT NULL,
created int(11) NOT NULL,
modified int(11) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
第四步,建立一个模型 system/application/models/product.php
最后修改于 2008-10-21