错误信息:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8' at line 1
CREATE TABLE ysxz_ad
( id
int(10) unsigned NOT NULL AUTO_INCREMENT, title
varchar(100) NOT NULL DEFAULT '', classid
tinyint(1) unsigned NOT NULL DEFAULT '0', hits
int(10) unsigned NOT NULL DEFAULT '0', addtime
int(10) unsigned NOT NULL DEFAULT '0', updatetime
int(10) unsigned NOT NULL DEFAULT '0', image_src
varchar(255) NOT NULL DEFAULT '', image_url
varchar(255) NOT NULL DEFAULT '', image_alt
varchar(100) NOT NULL DEFAULT '', order
smallint(4) unsigned NOT NULL DEFAULT '0', status
tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (id
)) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8
数据库
DROP TABLE IF EXISTS {dbprefix}ad
;
CREATE TABLE {dbprefix}ad
(id
int(10) unsigned NOT NULL AUTO_INCREMENT,title
varchar(100) NOT NULL DEFAULT '',classid
tinyint(1) unsigned NOT NULL DEFAULT '0',hits
int(10) unsigned NOT NULL DEFAULT '0',addtime
int(10) unsigned NOT NULL DEFAULT '0',updatetime
int(10) unsigned NOT NULL DEFAULT '0',image_src
varchar(255) NOT NULL DEFAULT '',image_url
varchar(255) NOT NULL DEFAULT '',image_alt
varchar(100) NOT NULL DEFAULT '',order
smallint(4) unsigned NOT NULL DEFAULT '0',status
tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (id
)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;