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

Problem in database: account_storage

sidekoolz

New Member
Joined
Feb 28, 2016
Messages
23
Reaction score
0
[Error - mysql_real_query] Query: SELECT value FROM account_storage WHERE account_id = 4 and key = 722524 LIMIT 1;
Message: Unknown column 'account_id' in 'where clause'
[Error - mysql_store_result] Query: SELECT value FROM account_storage WHERE account_id = 4 and key = 722524 LIMIT 1;
Message: Unknown column 'account_id' in 'where clause'
[Error - mysql_real_query] Query: SELECT value FROM account_storage WHERE account_id = 4 and key = 145144 LIMIT 1;
Message: Unknown column 'account_id' in 'where clause'
[Error - mysql_store_result] Query: SELECT value FROM account_storage WHERE account_id = 4 and key = 145144 LIMIT 1;
Message: Unknown column 'account_id' in 'where clause'

This error appears after I open the server, what do I need to do in SQL?

Thanks!
 
Solution
I can't fix it because I don't know which file has the wrong query. :(
Search your files for it.
Download a modern text editor such as sublime text, add your folder to project by clicking this:
OGgeaee.png

Then ctrl+shift+f to search all files in project and search for:
SQL:
SELECT `value` FROM `account_storage` WHERE `account_id`
You have a query running (I don't know where, I'm no mindreader).
Find it in your files, it will say the nearly the exact same thing in the code as it does in the error (SELECT value from ......)
All you have to do is find that and change where it says account_id and make it id instead.
 
You're going to have me keep saying the same thing over and over again until you eventually get it.
You change account_id in the query you're running from your code to id.
 
You can just add column "id" to your account storage...

SQL:
ALTER TABLE `account_storage` ADD `id` int(11) NOT NULL DEFAULT 0
 
I can't fix it because I don't know which file has the wrong query. :(
Search your files for it.
Download a modern text editor such as sublime text, add your folder to project by clicking this:
OGgeaee.png

Then ctrl+shift+f to search all files in project and search for:
SQL:
SELECT `value` FROM `account_storage` WHERE `account_id`
 
Solution
and i change account_id to id?
Post automatically merged:

Search your files for it.
Download a modern text editor such as sublime text, add your folder to project by clicking this:
OGgeaee.png

Then ctrl+shift+f to search all files in project and search for:
SQL:
SELECT `value` FROM `account_storage` WHERE `account_id`

It worked, thank you very much and sorry, it's been 12 years since I touched otservs.
 
Last edited:
Back
Top