分享

写回答

发帖

[提问] 我用phpmyadmin导不进数据怎么办

GoDaddy GoDaddy 1565 人阅读 | 5 人回复

发表于 2008-4-2 09:07:47 | 显示全部楼层 |阅读模式

您的 SQL 查询可能有错。如果可能的话,以下会列出 MySQL 服务器的错误输出,这可能对您解决问题有一定的帮助作用。

ERROR: 未知的标点符号字符串 @ 2069
STR: ?,
SQL:
INSERT INTO `21tc_article` VALUES (5, 2, '鍏徃绠€浠?, '', '', '', '', 0, 1, 0, '', 0, '');
INSERT INTO `21tc_article` VALUES (6, -1, '鐢ㄦ埛鍗忚', '', '', '', '', 0, 1, 0, '', 0, '');

# --------------------------------------------------------

#
# 表的结构 `21tc_article_cat`
#

DROP TABLE IF EXISTS `21tc_article_cat`;
CREATE TABLE `21tc_article_cat` (
  `cat_id` smallint(5) NOT NULL auto_increment,
  `cat_name` varchar(255) NOT NULL default '',
  `cat_type` tinyint(1) unsigned NOT NULL default '1',
  `keywords` varchar(255) NOT NULL default '',
  `cat_desc` varchar(255) NOT NULL default '',
  `sort_order` tinyint(3) unsigned NOT NULL default '0',
  `show_in_nav` tinyint(1) unsigned NOT NULL default '0',
  `parent_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`cat_id`),
  KEY `cat_type` (`cat_type`),
  KEY `sort_order` (`sort_order`),
  KEY `parent_id` (`parent_id`)
) TYPE=MyISAM AUTO_INCREMENT=4 ;

#
# 导出表中的数据 `21tc_article_cat`
#

INSERT INTO `21tc_article_cat` VALUES (1, '绯荤粺鍒嗙被', 2, '', '绯荤粺淇濈暀鍒嗙被', 0, 0, 0);
INSERT INTO `21tc_article_cat` VALUES (2, '缃戝簵淇℃伅', 3, '', '缃戝簵淇℃伅鍒嗙被', 0, 0, 1);
INSERT INTO `21tc_article_cat` VALUES (3, '缃戝簵甯姪鍒嗙被', 4, '', '缃戝簵甯姪鍒嗙被', 0, 0, 1);

# --------------------------------------------------------

#
# 表的结构 `21tc_attribute`
#

DROP TABLE IF EXISTS `21tc_attribute`;
CREATE TABLE `21tc_attribute` (
  `attr_id` smallint(5) unsigned NOT NULL auto_increment,
  `cat_id` smallint(5) unsigned NOT NULL default '0',
  `attr_name` varchar(60) NOT NULL default '',
  `attr_input_type` tinyint(1) unsigned NOT NULL default '1',
  `attr_type` tinyint(1) unsigned NOT NULL default '1',
  `attr_values` text NOT NULL,
  `attr_index` tinyint(1) unsigned NOT NULL default '0',
  `sort_order` tinyint(3) unsigned NOT NULL default '0',
  `is_linked` tinyint(1) unsigned NOT NULL default '0',
  `attr_group` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`attr_id`),
  KEY `cat_id` (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=172 ;

#
# 导出表中的数据 `21tc_attribute`
#

INSERT INTO `21tc_attribute` VALUES (1, 1, '浣滆€?, 0, 0, '', 0, 0, 0, 0);



SQL 查询:

INSERT INTO `21tc_article` VALUES (5, 2, '鍏徃绠€浠?, '', '', '', '', 0, 1, 0, '', 0, ''); INSERT INTO `21tc_article` VALUES (6, -1, '鐢ㄦ埛鍗忚', '', '', '', '', 0, 1, 0, '', 0, ''); # -------------------------------------------------------- # # 表的结构 `21tc_article_cat` # DROP TABLE IF EXISTS `21tc_article_cat`; CREATE TABLE `21tc_article_cat` ( `cat_id` smallint(5) NOT NULL auto_increment, `cat_name` varchar(255) NOT NULL default '', `cat_type` tinyint(1) unsigned NOT NULL default '1', `keywords` varchar(255) NOT NULL default '', `cat_desc` varchar(255) NOT NULL default '', `sort_order` tinyint(3) unsigned NOT NULL default '0', `show_in_nav` tinyint(1) unsigned NOT NULL default '0', `parent_id` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_type` (`cat_type`), KEY `sort_order` (`sort_order`), KEY `parent_id` (`parent_id`) ) TYPE=MyISAM AUTO_INCREMENT=4 ; # # 导出表中的数据 `21tc_article_cat` # INSERT INTO `21tc_article_cat` VALUES (1, '绯荤粺鍒嗙被', 2, '', '绯荤粺淇濈暀鍒嗙被', 0, 0, 0); INSERT INTO `21tc_article_cat` VALUES (2, '缃戝簵淇℃伅', 3, '', '缃戝簵淇℃伅鍒嗙被', 0, 0, 1); INSERT INTO `21tc_article_cat` VALUES (3, '缃戝簵甯姪鍒嗙被', 4, '', '缃戝簵甯姪鍒嗙被', 0, 0, 1); # -------------------------------------------------------- # # 表的结构 `21tc_attribute` # DROP TABLE IF EXISTS `21tc_attribute`; CREATE TABLE `21tc_attribute` ( `attr_id` smallint(5) unsigned NOT NULL auto_increment, `cat_id` smallint(5) unsigned NOT NULL default '0', `attr_name` varchar(60) NOT NULL default '', `attr_input_type` tinyint(1) unsigned NOT NULL default '1', `attr_type` tinyint(1) unsigned NOT NULL default '1', `attr_values` text NOT NULL, `attr_index` tinyint(1) unsigned NOT NULL default '0', `sort_order` tinyint(3) unsigned NOT NULL default '0', `is_linked` tinyint(1) unsigned NOT NULL default '0', `attr_group` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`attr_id`), KEY `cat_id` (`cat_id`) ) TYPE=MyISAM AUTO_INCREMENT=172 ; # # 导出表中的数据 `21tc_attribute` # INSERT INTO `21tc_attribute` VALUES (1, 1, '浣滆€?, 0, 0, '', 0, 0, 0, 0);

MySQL 返回:

#1064 - 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 '�ㄦ埛�忚', '', '', '', '', 0, 1, 0, '', 0, '');


老是出错 出这个错是因为版本问题还是乱码的问题
我在本地导出的时候汉字是乱码 还有phpmyadmin和godaddy上的 也不一样 数据库版本也不一样 会不会有影响

[ 本帖最后由 21tclyq 于 2008-4-2 09:09 AM 编辑 ]

回答|共 5 个

easol

发表于 2008-4-2 09:59:37 | 显示全部楼层

应该是导入时的编码问题,导入时一般用latin编码,如果不行就用uft-8编码

21tclyq

发表于 2008-4-2 10:54:48 | 显示全部楼层

我导入的时候就是用utf-8编码出错的
和我本地导出是否有关系

21tclyq

发表于 2008-4-3 09:41:41 | 显示全部楼层

怎么没人回答呢?

大漠孤狼

发表于 2008-4-3 09:49:13 | 显示全部楼层

用latin试一下
如果不行可以用帝国备份王等工具看看

21tclyq

发表于 2008-4-3 09:57:54 | 显示全部楼层

好的 谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则