DROP TABLE IF EXISTS `phpcms_picture`;
CREATE TABLE `phpcms_picture` (
  `pictureid` int(10) unsigned NOT NULL auto_increment,
  `catid` smallint(5) unsigned NOT NULL default '0',
  `specialid` smallint(5) unsigned NOT NULL default '0',
  `typeid` smallint(5) unsigned NOT NULL default '0',
  `title` varchar(100) NOT NULL default '',
  `style` varchar(50) NOT NULL default '',
  `introduce` text NOT NULL,
  `keywords` varchar(100) NOT NULL default '',
  `author` varchar(50) NOT NULL default '',
  `copyfrom` varchar(255) NOT NULL default '',
  `pictureurls` text NOT NULL,
  `hits` int(10) unsigned NOT NULL default '0',
  `comments` int(10) unsigned NOT NULL default '0',
  `thumb` varchar(255) NOT NULL default '',
  `username` varchar(20) NOT NULL default '',
  `addtime` int(10) unsigned NOT NULL default '0',
  `editor` varchar(25) NOT NULL default '',
  `edittime` int(10) unsigned NOT NULL default '0',
  `checker` varchar(25) NOT NULL default '',
  `checktime` int(10) unsigned NOT NULL default '0',
  `templateid` varchar(20) NOT NULL default '0',
  `skinid` varchar(20) NOT NULL default '0',
  `arrposid` varchar(50) NOT NULL default '',
  `status` tinyint(1) NOT NULL default '0',
  `listorder` smallint(4) unsigned NOT NULL default '0',
  `arrgroupidview` varchar(255) NOT NULL default '',
  `readpoint` smallint(5) unsigned NOT NULL default '0',
  `ishtml` tinyint(1) unsigned NOT NULL default '1',
  `htmldir` varchar(20) NOT NULL default '',
  `prefix` varchar(50) NOT NULL default '',
  `urlruleid` tinyint(3) unsigned NOT NULL default '0',
  `islink` tinyint(1) unsigned NOT NULL default '0',
  `linkurl` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`pictureid`),
  KEY `catid` (`catid`,`status`,`listorder`,`pictureid`),
  KEY `typeid` (`typeid`,`catid`,`status`,`listorder`,`pictureid`),
  KEY `endtime` (`status`,`arrposid`),
  KEY `username` (`username`(10)),
  KEY `hits` (`status`,`hits`,`pictureid`)
) TYPE=MyISAM;