ZendFramework2入门教程第7章 实例应用7.4 创建数据表 album

7.4 创建数据表 album

在此我们仍然后前面章节提到的 test 数据库,在test数据库里添加一个album表并插入数据,具体如下:

CREATE TABLE album(id int(10) NOT NULL AUTO_INCREMENT,title varchar(100) NOT NULL,artist varchar(1000) NOT NULL,PRIMARY KEY(id));
INSERT INTO news(title,artist) VALUES(‘First album’,’artist01’);
INSERT INTO news(title,artist) VALUES(‘Second album’,’artist02’);
INSERT INTO news(title,artist) VALUES(‘Third album’,’artist03’);
INSERT INTO news(title,artist) VALUES(‘fourth album’,’artist04’);
INSERT INTO news(title,artist) VALUES(‘Fifth album’,’artist05’);
INSERT INTO news(title,artist) VALUES(‘Sixth album’,’artist06’);