vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Database Error (https://vborg.vbsupport.ru/showthread.php?t=141621)

Xplorer4x4 03-10-2007 06:02 AM

Database Error
 
PHP Code:

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:

[sql]DESCRIBE user;
SHOW INDEX FROM user;[/sql]

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

Quote:

Originally Posted by Marco van Herwaarden (Post 1200001)
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:

PHP Code:

Invalid SQL:

        
SELECT FROM guest FORCE INDEX (lastactiveWHERE 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;
PHP Code:

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

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


All times are GMT. The time now is 12:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01069 seconds
  • Memory Usage 1,774KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete