我在服务器上工作,但遇到一个小问题,当我尝试运行服务器时遇到以下错误:petid
中的field list
列未知,我真的不知道什么是字段列表,这从来没有发生过我
这是我尝试运行服务器时的样子:
这是我的mysql代码的一部分的样子:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `accounts`
--
DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accounts` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(13) NOT NULL default '',
`password` varchar(128) NOT NULL default '',
`salt` varchar(32) NULL,
`loggedin` tinyint(4) NOT NULL default '0',
`lastlogin` timestamp NULL default NULL,
`createdat` timestamp NOT NULL default CURRENT_TIMESTAMP,
`birthday` date NOT NULL default '0000-00-00',
`banned` tinyint(1) NOT NULL default '0',
`banreason` text NOT NULL,
`gm` tinyint(1) NOT NULL default '0',
`email` tinytext,
`emailcode` varchar(40) default NULL,
`forumaccid` int(11) NOT NULL default '0',
`macs` tinytext NOT NULL,
`lastpwemail` timestamp NOT NULL default '2002-12-31 23:00:00',
`SessionIP` text NULL,
`greason` text NULL,
`tempban` text NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `forumaccid` (`forumaccid`),
KEY `ranking1` (`id`,`banned`,`gm`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accounts`
--
LOCK TABLES `accounts` WRITE;
/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;
INSERT INTO `accounts` VALUES (1,'admin','d033e22ae348aeb5660fc2140aec35850c4da997',NULL,0,'2008-04-26 12:15:30','2008-04-26 12:15:30','2008-04-26',0,'',1,NULL,NULL,0,'','2002-12-31 23:00:00',NULL,NULL,NULL);
/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `buddies`
--
DROP TABLE IF EXISTS `buddies`;
CREATE TABLE `buddies` (
`id` int(11) NOT NULL auto_increment,
`characterid` int(11) NOT NULL,
`buddyid` int(11) NOT NULL,
`pending` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `buddies_ibfk_1` (`characterid`),
CONSTRAINT `buddies_ibfk_1` FOREIGN KEY (`characterid`) REFERENCES `characters` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `buddies`
--
LOCK TABLES `buddies` WRITE;
/*!40000 ALTER TABLE `buddies` DISABLE KEYS */;
/*!40000 ALTER TABLE `buddies` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `channelconfig`
--
DROP TABLE IF EXISTS `channelconfig`;
CREATE TABLE `channelconfig` (
`channelconfigid` int(10) unsigned NOT NULL auto_increment,
`channelid` int(10) unsigned NOT NULL default '0',
`name` tinytext NOT NULL,
`value` tinytext NOT NULL,
PRIMARY KEY (`channelconfigid`),
KEY `channelid` (`channelid`),
CONSTRAINT `channelconfig_ibfk_1` FOREIGN KEY (`channelid`) REFERENCES `channels` (`channelid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `channelconfig`
--
LOCK TABLES `channelconfig` WRITE;
/*!40000 ALTER TABLE `channelconfig` DISABLE KEYS */;
INSERT INTO `channelconfig` VALUES (1,2,'net.sf.odinms.channel.net.port','7576');
/*!40000 ALTER TABLE `channelconfig` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `channels`
--
DROP TABLE IF EXISTS `channels`;
CREATE TABLE `channels` (
`channelid` int(10) unsigned NOT NULL auto_increment,
`world` int(11) NOT NULL default '0',
`number` int(11) default NULL,
`key` varchar(40) NOT NULL default '',
PRIMARY KEY (`channelid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `channels`
--
LOCK TABLES `channels` WRITE;
/*!40000 ALTER TABLE `channels` DISABLE KEYS */;
INSERT INTO `channels` VALUES (1,0,1,'2062e90b3ea10a86ff666a76c41aa0d9e9d88f4e'),(2,0,2,'5dfc64fff3b07c7c01ebd39706ec3cf3e6c37464'),(3,0,3,'f47ef28d4a014d8de91de9f28ae6fcd52dfb5f77');
/*!40000 ALTER TABLE `channels` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `characters`
--
DROP TABLE IF EXISTS `characters`;
CREATE TABLE `characters` (
`id` int(11) NOT NULL auto_increment,
`accountid` int(11) NOT NULL default '0',
`world` int(11) NOT NULL default '0',
`name` varchar(13) NOT NULL default '',
`level` int(11) NOT NULL default '0',
`exp` int(11) NOT NULL default '0',
`str` int(11) NOT NULL default '0',
`dex` int(11) NOT NULL default '0',
`luk` int(11) NOT NULL default '0',
`int` int(11) NOT NULL default '0',
`hp` int(11) NOT NULL default '0',
`mp` int(11) NOT NULL default '0',
`maxhp` int(11) NOT NULL default '0',
`maxmp` int(11) NOT NULL default '0',
`meso` int(11) NOT NULL default '0',
`hpApUsed` int(11) NOT NULL default '0',
`mpApUsed` int(11) NOT NULL default '0',
`job` int(11) NOT NULL default '0',
`skincolor` int(11) NOT NULL default '0',
`gender` int(11) NOT NULL default '0',
`fame` int(11) NOT NULL default '0',
`hair` int(11) NOT NULL default '0',
`face` int(11) NOT NULL default '0',
`ap` int(11) NOT NULL default '0',
`sp` int(11) NOT NULL default '0',
`map` int(11) NOT NULL default '0',
`spawnpoint` int(11) NOT NULL default '0',
`gm` tinyint(1) NOT NULL default '0',
`party` int(11) NOT NULL default '0',
`buddyCapacity` int(11) NOT NULL default '25',
`createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
`rank` INT UNSIGNED NOT NULL default '1',
`rankMove` INT NOT NULL default '0',
`jobRank` INT UNSIGNED NOT NULL default '1',
`jobRankMove` INT NOT NULL default '0',
`petid` INT NULL default '0',
PRIMARY KEY (`id`),
KEY `accountid` (`accountid`),
KEY `party` (`party`),
KEY `ranking1` (`level`,`exp`),
KEY `ranking2` (`gm`,`job`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=30001;
--
-- Dumping data for table `characters`
--
LOCK TABLES `characters` WRITE;
/*!40000 ALTER TABLE `characters` DISABLE KEYS */;
INSERT INTO `characters` VALUES (30000,1,0,'Admin',200,0,999,999,999,999,30000,30000,30000,30000,10000000,0,0,510,0,0,0,30000,20000,100,100,0,0,1,0,25,'2008-04-26 12:26:47',1,0,1,0,NULL);
/*!40000 ALTER TABLE `characters` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cheatlog`
--
DROP TABLE IF EXISTS `cheatlog`;
CREATE TABLE `cheatlog` (
`id` int(11) NOT NULL auto_increment,
`cid` int(11) NOT NULL default '0',
`offense` tinytext NOT NULL,
`count` int(11) NOT NULL default '0',
`lastoffensetime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`param` tinytext NOT NULL,
PRIMARY KEY (`id`),
KEY `cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `cheatlog`
--
LOCK TABLES `cheatlog` WRITE;
/*!40000 ALTER TABLE `cheatlog` DISABLE KEYS */;
/*!40000 ALTER TABLE `cheatlog` ENABLE KEYS */;
UNLOCK TABLES;
最佳答案
您的表“字符”具有名为“ petid”的列。也许您正在执行“插入”查询。检查您的查询目标表是否为“字符”。当您尝试在不存在的列中插入值时,通常会发生此错误。
关于java - 字段列表中的未知列“petid”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34881177/