• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Console query problems! [mysql query]

lord azteck

New Member
Joined
Jan 4, 2009
Messages
221
Reaction score
3
Hello, in my console i've got this errors:

Code:
[25/06/2010 16:25:59] mysql_real_query(): INSERT INTO player_advances (cid, skill, oldlevel, newlevel, time) VALUES ('22', '1', '11', '12', '1277501159' ) - MYSQL ERROR: Table 'alofokeonline.player_advances' doesn't exist (1146)

Code:
[25/06/2010 16:21:21] [Error - CreatureScript Interface] 
[25/06/2010 16:21:21] data/creaturescripts/scripts/rep/repLook.lua:onLook
[25/06/2010 16:21:21] Description: 
[25/06/2010 16:21:21] data/lib/database.lua:60: [Result:getDataInt] Result not set!
[25/06/2010 16:21:21] stack traceback:
[25/06/2010 16:21:21] 	[C]: in function 'error'
[25/06/2010 16:21:21] 	data/lib/database.lua:60: in function 'getDataInt'
[25/06/2010 16:21:21] 	[string "function getRepPoints(cid)..."]:3: in function 'getRepPoints'
[25/06/2010 16:21:21] 	data/creaturescripts/scripts/rep/repLook.lua:10: in function <data/creaturescripts/scripts/rep/repLook.lua:5>
[25/06/2010 16:21:24] mysql_real_query(): SELECT `rep` FROM `players` WHERE `id` = 15 LIMIT 1 - MYSQL ERROR: Unknown column 'rep' in 'field list' (1054)

Too much thinks like that, soo how can i fix that, maybe a query ?

thanks fur ur help !
 
Solution
first one:
PHP:
DROP TABLE IF EXISTS `player_advances`;

CREATE TABLE `player_advances` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) DEFAULT NULL,
  `skill` int(11) DEFAULT NULL,
  `oldlevel` int(11) DEFAULT NULL,
  `newlevel` int(11) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cid` (`cid`),
  CONSTRAINT `player_advances_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

second one:
PHP:
ALTER TABLE `players` ADD `rep` INT( 11 ) NOT NULL DEFAULT '0';
first one:
PHP:
DROP TABLE IF EXISTS `player_advances`;

CREATE TABLE `player_advances` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) DEFAULT NULL,
  `skill` int(11) DEFAULT NULL,
  `oldlevel` int(11) DEFAULT NULL,
  `newlevel` int(11) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `cid` (`cid`),
  CONSTRAINT `player_advances_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `players` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

second one:
PHP:
ALTER TABLE `players` ADD `rep` INT( 11 ) NOT NULL DEFAULT '0';
 
Solution
But it didnt work:(

it says this : 1string(740) "INSERT INTO `players`(`name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `premend`, `online`, `balance`) VALUES ('Stig', '1', '3', '8', '1', '185', '185', '4200', '68', '76', '78', '58', '128', '0', '0', '40', '40', '0', '100', '2', '5', '5', '2', '', '470', '1', '0', '0', '1', '0', '0', '0', '', '0', '0', '0', '10', '10', '10', '0', '0', '0');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Thread stack overrun: 8688 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.

Do you know how to solve this problem? @HalfAway

Problem solved
 
Last edited:
Back
Top