PDA

View Full Version : Database Error


Xplorer4x4
03-10-2007, 06:02 AM
SELECT * FROM user FORCE INDEX (lastactivity)
WHERE lastactivity > 1173426936 ORDER BY username;

MySQL Error : Key 'lastactivity' doesn't exist in table 'user'
Error Number : 1176
Date : Saturday, March 10th 2007 @ 07:55:36 AM
Script : /index.php
Referrer : /index.php
IP Address :
Username : Xplorer4x4
Classname : vb_database

I have deleted all my hacks and now I have this error. I deleted all my hacks due to one of them decided to enable debug mode and disable most admin cp functions.

Marco van Herwaarden
03-10-2007, 06:07 AM
Could you runt the following 2 queries and post the outout:

DESCRIBE user;
SHOW INDEX FROM user;

Xplorer4x4
03-10-2007, 06:13 AM
<a href="http://img176.imageshack.us/img176/157/tablerp3.gif" target="_blank">http://img176.imageshack.us/img176/157/tablerp3.gif</a>
Here is a screen shot.

Marco van Herwaarden
03-10-2007, 06:35 AM
That only answers half of my question.

It seems you have added an index yourself on 'lastactivity', as this is not a default vB index. This index might be corrupted, i suggest dropping the index. If all s working as it should, you could try adding it again.

Also this is not a default vB query, as vB nowhere in the source uses FORCE INDEX, i suggest removing that code.

Xplorer4x4
03-10-2007, 06:43 AM
That only answers half of my question.

It seems you have added an index yourself on 'lastactivity', as this is not a default vB index. This index might be corrupted, i suggest dropping the index. If all s working as it should, you could try adding it again.

Also this is not a default vB query, as vB nowhere in the source uses FORCE INDEX, i suggest removing that code.
What was the other half?:confused: I ran the query and posted the out put. :confused:

I have all original vb files intact so I can;t remove it.

Marco van Herwaarden
03-10-2007, 06:57 AM
I asked for the out put of 2 queries, you only gave the output of 1 of them.

If it is not in a code-edit, then this query must come from a plugin, disable it.

Xplorer4x4
03-10-2007, 07:02 AM
Well as i said in the first post.. I have deleted all my hacks. All files are in tact.

The screen shot says I executed both queries.:confused:

Regardless I did a quick fresh install on a db. Droped the last activity table from my live database. Imported the tabel from my fresh install.

Now I have a new database error:
Database error in vBulletin 3.6.5:

Invalid SQL:

SELECT * FROM guest FORCE INDEX (lastactive) WHERE lastactive > 1173430515;

MySQL Error : Table 'config_vb.guest' doesn't exist
Error Number : 1146
Date : Saturday, March 10th 2007 @ 08:55:15 AM
Script : /index.php
Referrer : /online.php
IP Address :
Username :
Classname : vb_database
The weird thing is guest is not a default table in the database. :S

Ok checked an old database back up an imported a guest table from it. Now I am back to the first error.

SQL query: DESCRIBE user;
Field Type Null Key Default Extra
userid int(10) unsigned PRI NULL auto_increment
usergroupid smallint(5) unsigned MUL 0
membergroupids varchar(250)
displaygroupid smallint(5) unsigned 0
username varchar(100) MUL
password varchar(32)
passworddate date 0000-00-00
email varchar(100)
styleid smallint(5) unsigned 0
parentemail varchar(50)
homepage varchar(100)
icq varchar(20)
aim varchar(20)
yahoo varchar(32)
msn varchar(100)
skype varchar(32)
showvbcode smallint(5) unsigned 0
showbirthday smallint(5) unsigned 2
usertitle varchar(250)
customtitle smallint(6) 0
joindate int(10) unsigned 0
daysprune smallint(6) 0
lastvisit int(10) unsigned 0
lastpost int(10) unsigned MUL 0
lastpostid int(10) unsigned 0
posts int(10) unsigned 0
reputation int(11) 10
reputationlevelid int(10) unsigned 1
timezoneoffset varchar(4)
pmpopup smallint(6) 0
avatarid smallint(6) 0
avatarrevision int(10) unsigned 0
profilepicrevision int(10) unsigned 0
sigpicrevision int(10) unsigned 0
options int(10) unsigned 15
birthday varchar(10) MUL
birthday_search date MUL 0000-00-00
maxposts smallint(6) -1
startofweek smallint(6) 1
ipaddress varchar(15)
referrerid int(10) unsigned 0
languageid smallint(5) unsigned 0
emailstamp int(10) unsigned 0
threadedmode smallint(5) unsigned 0
autosubscribe smallint(6) -1
pmtotal smallint(5) unsigned 0
pmunread smallint(5) unsigned 0
salt char(3)
ipoints int(10) unsigned 0
infractions int(10) unsigned 0
warnings int(10) unsigned 0
infractiongroupids varchar(255)
infractiongroupid smallint(5) unsigned 0
adminoptions int(10) unsigned 0
vbp_vbplazaoptions int(10) unsigned 0

http://img237.imageshack.us/img237/46/tablevv9.gif
Here si the results of the two seperate queries.