MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8' at line 1 5
YouhaveanerrorinyourSQLsyntax.CheckthemanualthatcorrespondstoyourMySQLserverversionfo...
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
我本地测试没问题,在景安用也没问题,一直好好的。。
换了个IDC,就出这问题了。 展开
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
我本地测试没问题,在景安用也没问题,一直好好的。。
换了个IDC,就出这问题了。 展开
2017-09-03
展开全部
MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8' at line 1 pstmt=conn.prepareStatement("select username from user where username=?");
pstmt.setString(1,shopname);
这段中如果shopname是null的话执行结果可能有问题,所以最好先判断以下shopname是否非null。
pstmt.setString(1,shopname);
这段中如果shopname是null的话执行结果可能有问题,所以最好先判断以下shopname是否非null。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |