Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2012, 11:13 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default database help

Database error in vBulletin 4.2.0:

please can some one give me step by step instructions on how to fix this, nobody can login to the forum atm so very desperate for help

Invalid SQL:
DELETE FROM strikes WHERE striketime < 1344074169;

MySQL Error : Unknown column 'striketime' in 'where clause'
Error Number : 1054
Request Date : Saturday, August 4th 2012 @ 04:56:09 AM
Error Date : Saturday, August 4th 2012 @ 04:56:09 AM
Script : http://www.reign-of-chaos.co.uk/login.php?do=login
Referrer : http://www.reign-of-chaos.co.uk/admincp/index.php
IP Address : 88.97.12.60
Username : Wonko
Classname : vB_Database
MySQL Version : 5.1.63-community-log
Reply With Quote
  #2  
Old 08-04-2012, 11:25 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For some reason you're missing a column from that table. Since there's no permanent info in that table you could just drop it and recreate it, like

Code:
drop table strikes
then

Code:
CREATE TABLE strikes (
	striketime INT UNSIGNED NOT NULL DEFAULT '0',
	strikeip CHAR(15) NOT NULL DEFAULT '',
	username VARCHAR(100) NOT NULL DEFAULT '',
	KEY striketime (striketime),
	KEY strikeip (strikeip)
)
Reply With Quote
  #3  
Old 08-04-2012, 11:35 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you for your reply but I am a complete novice so where do I insert the code?

--------------- Added [DATE]1344084042[/DATE] at [TIME]1344084042[/TIME] ---------------

in phpmyadmin I found this

SQL query on database reignofc_vb:

do I paste the drop table strikes into this box?
then paste the second code into the same box?

sorry just never been in this situation before & never want to come back either
Reply With Quote
  #4  
Old 08-04-2012, 11:40 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would need to do it somewhere where you can execute sql queries, either in the Maintenance Menu in the admincp, or using phpmyadmin (if you have that available). Edit: oops - of course you can't use the admincp if you can't log in).

Edit: OK, I see you found phpmyadmin. Yes, paste the drop table command in that box, press go, then go back to SQL query and do the second part.
Reply With Quote
  #5  
Old 08-04-2012, 11:48 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its saying i need to display at least 1 column would this be strikes?
Reply With Quote
  #6  
Old 08-04-2012, 11:49 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know why it's saying that - is that an error message when you tried to drop the table?
Reply With Quote
  #7  
Old 08-04-2012, 11:56 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was using the wrong box now getting this message
1051 - Unknown table 'strikes'
so table is droped
now getting this
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Reply With Quote
  #8  
Old 08-04-2012, 11:57 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RoC wonko View Post
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Hmm...just so you know, I tested it before posting and it seemed to work. Are you maybe missing the closing paren on the last line?
Reply With Quote
Благодарность от:
RoC wonko
  #9  
Old 08-04-2012, 11:59 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it seams to have worked this time yes must have missed the paren the first attempt

--------------- Added [DATE]1344085274[/DATE] at [TIME]1344085274[/TIME] ---------------

it seams to have fixed the database error, thank you very much, just need to work out how to get into the cp panel after dbteck vbsecurity banned my ip

--------------- Added [DATE]1344085348[/DATE] at [TIME]1344085348[/TIME] ---------------

do you any way that it can be done?? the only admin who could do it before is away for a month to the states
Reply With Quote
  #10  
Old 08-04-2012, 12:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RoC wonko View Post
do you any way that it can be done?? the only admin who could do it before is away for a month to the states
If you have access to ftp files, then you can try downloading your includes/config.php file and adding the following line (at the top just under <?php)

Code:
define('DISABLE_HOOKS', 1);

then upload it and overwrite the existing file. Then hopefully you can log in and disable the vbsecurity product (or do whatever you have to do to enable your ip). Remove the DISABLE_HOOKS line from your config.php when you're done.

If this doesn't work you'll have to ask dbtech - I'm not familiar with that product.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:15 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.05160 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete