Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

RevCMS Arcturus Unknown column 'value' in 'where clause'

Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
Hi,
I want to make my RevCMS compatible with Arcturus but when I try to register I get this error: Unknown column 'value' in 'where clause'

I think it is because of bans in class.users.php:
Code:
[COLOR=#569CD6]final[/COLOR][COLOR=#D4D4D4] [/COLOR][COLOR=#569CD6]public[/COLOR][COLOR=#D4D4D4] [/COLOR][COLOR=#569CD6]function[/COLOR][COLOR=#D4D4D4] [/COLOR][COLOR=#DCDCAA]isBanned[/COLOR][COLOR=#D4D4D4]([/COLOR][COLOR=#9CDCFE]$value[/COLOR][COLOR=#D4D4D4])[/COLOR][COLOR=#D4D4D4]  {
    [COLOR=#569cd6]global[/COLOR] [COLOR=#9cdcfe]$engine[/COLOR];
    [COLOR=#c586c0]if[/COLOR]([COLOR=#9cdcfe]$engine[/COLOR]->num_rows([COLOR=#ce9178]"[/COLOR][COLOR=#569cd6]SELECT[/COLOR][COLOR=#ce9178] [/COLOR]*[COLOR=#ce9178] [/COLOR][COLOR=#569cd6]FROM[/COLOR][COLOR=#ce9178] bans [/COLOR][COLOR=#569cd6]WHERE[/COLOR][COLOR=#ce9178] value [/COLOR]=[COLOR=#ce9178] '[/COLOR][COLOR=#ce9178]"[/COLOR] . [COLOR=#9cdcfe]$value[/COLOR] . [COLOR=#ce9178]"' AND ban_expire >= '"[/COLOR] . [COLOR=#dcdcaa]time[/COLOR]() . [COLOR=#ce9178]"' "[/COLOR]) > [COLOR=#b5cea8]0[/COLOR]);
    {
      [COLOR=#c586c0]return[/COLOR] [COLOR=#569cd6]true[/COLOR];
    }
      
    [COLOR=#c586c0]return[/COLOR] [COLOR=#569cd6]false[/COLOR];
  }
  
  [COLOR=#569cd6]final[/COLOR] [COLOR=#569cd6]public[/COLOR] [COLOR=#569cd6]function[/COLOR] [COLOR=#dcdcaa]getReason[/COLOR]([COLOR=#9cdcfe]$value[/COLOR])
  {
    [COLOR=#569cd6]global[/COLOR] [COLOR=#9cdcfe]$engine[/COLOR];
    [COLOR=#c586c0]return[/COLOR] [COLOR=#9cdcfe]$engine[/COLOR]->result([COLOR=#ce9178]"[/COLOR][COLOR=#569cd6]SELECT[/COLOR][COLOR=#ce9178] ban_reason [/COLOR][COLOR=#569cd6]FROM[/COLOR][COLOR=#ce9178] bans [/COLOR][COLOR=#569cd6]WHERE[/COLOR][COLOR=#ce9178] value [/COLOR]=[COLOR=#ce9178] '[/COLOR][COLOR=#ce9178]"[/COLOR] . [COLOR=#9cdcfe]$value[/COLOR] . [COLOR=#ce9178]"' LIMIT 1"[/COLOR], [COLOR=#ce9178]"ban_reason"[/COLOR]);
  }
  
  [COLOR=#569cd6]final[/COLOR] [COLOR=#569cd6]public[/COLOR] [COLOR=#569cd6]function[/COLOR] [COLOR=#dcdcaa]hasClones[/COLOR]([COLOR=#9cdcfe]$ip[/COLOR])
  {
    [COLOR=#569cd6]global[/COLOR] [COLOR=#9cdcfe]$engine[/COLOR];
    [COLOR=#c586c0]if[/COLOR]([COLOR=#9cdcfe]$engine[/COLOR]->num_rows([COLOR=#ce9178]"[/COLOR][COLOR=#569cd6]SELECT[/COLOR][COLOR=#ce9178] [/COLOR]*[COLOR=#ce9178] [/COLOR][COLOR=#569cd6]FROM[/COLOR][COLOR=#ce9178] users [/COLOR][COLOR=#569cd6]WHERE[/COLOR][COLOR=#ce9178] ip_register [/COLOR]=[COLOR=#ce9178] '[/COLOR][COLOR=#ce9178]"[/COLOR] . [COLOR=#9cdcfe]$_SERVER[/COLOR][[COLOR=#ce9178]'REMOTE_ADDR'[/COLOR]] . [COLOR=#ce9178]"'"[/COLOR]) == [COLOR=#b5cea8]1[/COLOR])
    {
      [COLOR=#c586c0]return[/COLOR] [COLOR=#569cd6]true[/COLOR];
    }
    
    [COLOR=#c586c0]return[/COLOR] [COLOR=#569cd6]false[/COLOR];
[/COLOR]
[COLOR=#D4D4D4]  }[/COLOR]

Can someone help me? Because there is no value in bans table.
 
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
The error says exactly whats wrong? The column value does not exist in the bans table because Arcturus does not have such a column.

I know. But I don't know how to fix it, because I don't know what to use instead of value.
If I remove it completely, I can't even register anymore -> errors.
 
Upvote 0
Elite Diviner
Joined
Sep 17, 2013
Messages
403
Reaction score
58
I know. But I don't know how to fix it, because I don't know what to use instead of value.
If I remove it completely, I can't even register anymore -> errors.
The name ' value ' must have another name on the ' bans ' table. Check for yourself.
 
Upvote 0
Newbie Spellweaver
Joined
Dec 25, 2015
Messages
56
Reaction score
27
The name ' value ' must have another name on the ' bans ' table. Check for yourself.

I checked it before I opened this thread. The problem is, I don't know what value is out of these:
idint(11) Auto-Inkrement
user_idint(11)
ipvarchar(50) []
machine_idvarchar(255)
user_staff_idint(11)
timestampint(11)
ban_expireint(32) [0]
ban_reasonvarchar(200) []
typeenum('account','ip','machine','super')[account]Account is the entry in the users table banned. IP is any client that connects with that IP. Machine is the computer that logged in. Super is all of the above.
cfh_topicint(4) [-1]

Is it cfh_topic?
 
Upvote 0
Newbie Spellweaver
Joined
Jul 1, 2012
Messages
21
Reaction score
0
Value should be changed to: user_id , ip or machine_id not sure how you want it to be checked.
 
Upvote 0
Skilled Illusionist
Joined
Dec 24, 2015
Messages
336
Reaction score
31
Are you stupid? Value should be changed to 'type' as you see in the picture.
Well, @Jordyever is right.
Value is user_id, IP and machine_id. Some emulator use only value and some separate them, so they don't have to make so many columns when banning.

The type is simply to make it easier to see what ban they got.
For example, if someone gets banned by their IP it would say type = IP.

And you can clearly see that he is trying to get the users username/id though the value table.

So the only thing you'll have to do is to change value to the type you want to keep from your hotel.
If you're trying to keep out everyone who's IP banned just use IP instead of value and if your trying to keep those who have been banned by their machine ID just use machine_id instead of value.

You could also make it block them all, by adding some lines or just editing some stuff it's not that hard.
 
Upvote 0
Back
Top