SQL Error : 1054 Unknown column

Status
Not open for further replies.

victor91

New Member
Messages
22
Reaction score
0
Points
0
Hi my friend made a user in my website, and he can't login he gets this error

SQL Error : 1054 Unknown column 'user_login_tries' in 'field list'

SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try FROM nuke_users WHERE username = 'chunkmonkey'

Line : 70
File : login.ph
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
I'm going to see that is a pretty decent error. Look on line 70 of login.php , it sounds like you're missing teh column 'user_login_tries'
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
I would check the database and make sure that column exists.
 

victor91

New Member
Messages
22
Reaction score
0
Points
0
ACtually the column does exist



$sql = "SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
{


BUT it says here from users_table isn't it supposed to be nuke_users thats what it says in phpmyadmin database.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
USERS_TABLE might be a defined variable which ='s nuke_users. You could try changing it manually to `nuke_users` to see if it fixes it though.

-Corey
 
Status
Not open for further replies.
Top