• 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!

Solved mysql_real_query Error.

XouruS

Active Member
Joined
Dec 29, 2009
Messages
941
Reaction score
36
Location
Canada
Hello, im getting this error in my .exe
can anyone help me fix this?

[25/08/2010 18:55:12] mysql_real_query(): UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1; - MYSQL ERROR: Unknown column 'onlinetimetoday' in 'field list' (1054)
 
Last edited:
This is assuming, both missing columns are Numeric, assuming Time online it's the time they have been playing in a day.

Code:
ALTER TABLE players ADD COLUMN onlinetimeall DOUBLE NULL  AFTER description, ADD COLUMN onlinetimetoday DOUBLE NULL  AFTER description ;

You need to run that on http://localhost/PHPMYADMIN/
You also need to know your root password.

Once in there, select OTSERV database, then clic on "SQL", pase that text, and continue.

If that query doesn't work, try this:
Code:
ALTER TABLE `otserv`.`players` ADD COLUMN `onlinetimeall` DOUBLE NULL  AFTER `description` , ADD COLUMN `onlinetimetoday` DOUBLE NULL  AFTER `description` ;

This because, MySQL vary from version to version.
 
This is assuming, both missing columns are Numeric, assuming Time online it's the time they have been playing in a day.

Code:
ALTER TABLE players ADD COLUMN onlinetimeall DOUBLE NULL  AFTER description, ADD COLUMN onlinetimetoday DOUBLE NULL  AFTER description ;

You need to run that on http://localhost/PHPMYADMIN/
You also need to know your root password.

Once in there, select OTSERV database, then clic on "SQL", pase that text, and continue.

If that query doesn't work, try this:
Code:
ALTER TABLE `otserv`.`players` ADD COLUMN `onlinetimeall` DOUBLE NULL  AFTER `description` , ADD COLUMN `onlinetimetoday` DOUBLE NULL  AFTER `description` ;

This because, MySQL vary from version to version.


Worked man!
REP++
 
Back
Top