vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   Getting SQL Error , pls help (https://vborg.vbsupport.ru/showthread.php?t=77583)

H@K@N 03-06-2005 10:13 AM

Getting SQL Error , pls help
 
Hi,

first of all, i have to say, that i have used the Warning Hack from ZeroTolerance 1.5.

By mistake i runned first the install script for AWS 3.1.9 instead of the upgrade script.

Afterwards i have run the upgrade Script, no special Messages. Have edited all the Files.

I have set the setting in the Admincp :

If i hit "View Warnings Log" in Admincp, i am getting follwoing SQL Error :

Code:

Ungueltige SQL-Abfrage: select w.*,u.username as wusername,u.userid as wuserid,wt.*,wuser.username as warned_username_v,wuser.userid as warned_userid_v, ruser.username as removed_by_v, (w.warned_time+wt.warn_maturity*24*60*60) AS maturitydate from
        warnings w
        left join user wuser on(wuser.userid=w.warned_user)
        left join user u on(u.userid=w.warned_by)
        left join user ruser on(ruser.userid=w.removed_by)
        left join warning_types wt on(wt.tid=w.warned_warning_id) ORDER BY w.warned_time DESC LIMIT 0, 20
mysql error: Unknown column 'w.removed_by' in 'on clause'

mysql error number: 1054


all other options are working there.


Second Problem. :

If i try to Warn somebody from Postbit Legacy, i am gettin following Error :

Code:

Ungueltige SQL-Abfrage: select * from warnings where warned_post='86444' AND warned_status='A'
mysql error: Unknown column 'warned_status' in 'where clause'

mysql error number: 1054

Coudl somebody help me ?


gr33tz

taffy056 03-06-2005 07:43 PM

Hi,

Getting a similar error message on the upgrade from Zero Tolerance's hack, I am using vb 3.0.7 though.


Code:

Database error in vBulletin 3.0.7:
Invalid SQL: select w.*,u.username as wusername,u.userid as wuserid,wt.*,wuser.username as warned_username_v,wuser.userid as warned_userid_v, ruser.username as removed_by_v, (w.warned_time+wt.warn_maturity*24*60*60) AS maturitydate from
 warnings w
 left join user wuser on(wuser.userid=w.warned_user)
 left join user u on(u.userid=w.warned_by)
 left join user ruser on(ruser.userid=w.removed_by)
 left join warning_types wt on(wt.tid=w.warned_warning_id) ORDER BY w.warned_time DESC LIMIT 0, 20
mysql error: Unknown column 'w.removed_by' in 'on clause'
mysql error number: 1054


Code:

Database error in vBulletin 3.0.7:
Invalid SQL: select * from warnings where warned_post='2800' AND warned_status='A'
mysql error: Unknown column 'warned_status' in 'where clause'
mysql error number: 1054
Date: Sunday 06th of March 2005 10:22:16 PM


sv1cec 03-07-2005 05:13 AM

Add the missing column, by running the following queries:

ALTER TABLE `".TABLE_PREFIX."warnings ADD COLUMN removed_by int(15)

ALTER TABLE `".TABLE_PREFIX."warnings ADD COLUMN removed_date int(15)

ALTER TABLE `".TABLE_PREFIX."warnings ADD COLUMN warned_status char(1)

ALTER TABLE `".TABLE_PREFIX."warnings ADD COLUMN caused_ban char(1)

These should fix the missing fields.

Let me know if you get any more errors. It's strange, because these fields exist in the upgrade_warn.php file, and of course, in the install_warn.php file, so they should have been created in either case.

Rgds

taffy056 03-07-2005 11:03 AM

Hi sv1cec,

Those queries did not work for me, what I did instead was uninstall using the uninstaller.php and then done a reinstall afterwards, that seemed to work fine, and now I have the AWS up and working fine :D So maybe H@K@N should try the same if thequery does not work for him.

thanks

H@K@N 03-07-2005 11:27 AM

4 me it worked .... but not with the Strings which was mentioned.

Don't know exactly, but i think the apostroph infront the Table_Prefix is not correct, so i have done this Statement in phpmyadmin, without Prefix.

Now its working ....

gr33tz

sv1cec 03-07-2005 11:32 AM

LoL,

yes, the queries wouldn't work, not because of the first single quote, but because of a missing second single quote:

ALTER TABLE `".TABLE_PREFIX."warnings` ADD COLUMN removed_by int(15)

ALTER TABLE `".TABLE_PREFIX."warnings` ADD COLUMN removed_date int(15)

ALTER TABLE `".TABLE_PREFIX."warnings` ADD COLUMN warned_status char(1)

ALTER TABLE `".TABLE_PREFIX."warnings` ADD COLUMN caused_ban char(1)

Sorry folks, I keep saying to myself, not to answer questions early in the morning.

Rgds

taffy056 03-07-2005 01:54 PM

Hi sv1cec,

Thanks for the heads up :), anyway I am really happy with this hack, thanks very much for sharing!!

sv1cec 03-08-2005 08:48 AM

Quote:

Originally Posted by taffy056
Hi sv1cec,

Thanks for the heads up :), anyway I am really happy with this hack, thanks very much for sharing!!

Most welcome!


All times are GMT. The time now is 04:56 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.01935 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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