...

View Full Version : Unknown column 'infractiongroupid' in 'field list'



Jealousy
08-17-2006, 05:11 AM
Whats the problem? Why is it doing this & how can I fix it?
Invalid SQL:


SELECT
user.username,
(user.options & 512) AS invisible,
user.usergroupid,
session.userid,
session.inforum,
session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1155786772
ORDER BY username ASC;

MySQL Error : Unknown column 'infractiongroupid' in 'field list'
Error Number : 1054
Date : Wednesday, August 16th 2006 @ 09:07:52 PM
Script :
Referrer :
IP Address :
Username :
Classname : vb_database

GJay
08-17-2006, 08:05 AM
it looks like maybe you've updated the code of your application without running the necessary database updates? (or vice-versa...)

guelphdad
08-17-2006, 01:26 PM
what are you doing on this line:

IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
it seems like you are trying to call two columns at once and give the second one an alias. I don't believe you can do that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum