PDA

View Full Version : Problem with database error


zell_11
06-04-2005, 08:27 AM
I am getting this error when i go into

View Warned Users

Invalid SQL: SELECT COUNT(*) AS users FROM user AS user where warnings>0 OR alerts>0
mysql error: Unknown column 'alerts' in 'where clause'

mysql error number: 1054

Date: Saturday 04th of June 2005 10:23:11 AM
Script: http://www.zenogaming.com/forums/admincp/admin_warn.php?act=viewwarnedusers
Referer: http://www.zenogaming.com/forums/admincp/index.php?do=nav


Anyone know the problem?

Also when i try and save a user i get this

Invalid SQL: UPDATE user SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
username = 'zell1',
email = 'liam@rpgzone.net',
languageid = '0',
usertitle = 'Junior Member',
contrib = '0',
customtitle = '0',
homepage = '',
icq = '',
aim = '',
yahoo = '',
msn = '',
parentemail = '',
posts = '0',
ipaddress = '81.155.227.167',
alerts = '',
warnings = '0',
warning_level = '0',
warning_bans = '0',
usergroupid = '2',
reputation = '10',
autosubscribe = '-1',
showvbcode = '1',
styleid = '0',
timezoneoffset = '0',
daysprune = '0',
threadedmode = '0',
referrerid = '0',
joindate = '1106740800',
lastactivity = '1114198980',
lastpost = '1108329900',
birthday = '',
birthday_search = '',
options = '3159',
reputationlevelid = '5',
membergroupids = '',
displaygroupid = '0'
WHERE userid=12
mysql error: Unknown column 'alerts' in 'field list'

mysql error number: 1054

Date: Saturday 04th of June 2005 10:24:57 AM
Script: http://www.zenogaming.com/forums/admincp/user.php
Referer: http://www.zenogaming.com/forums/admincp/user.php?do=edit&userid=12


Can anyone please tell me how to sort these

sv1cec
06-04-2005, 12:26 PM
Obviously the column alerts does not exist in your user table. Create it using:

ALTER TABLE " . TABLE_PREFIX . "user ADD COLUMN `alerts` int(5) default '0'