vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   SQL errors (https://vborg.vbsupport.ru/showthread.php?t=79710)

KimmiKat 04-10-2005 09:35 AM

SQL errors
 
I installed the hack and I get this when I hit "View Warned Users"

Code:

Database error in vBulletin 3.0.7:

Invalid SQL: SELECT COUNT(*) AS users FROM user AS user where warnings>0
mysql error: Unknown column 'warnings' in 'where clause'

mysql error number: 1054

And the following when I try to unban a user...

Code:

Database error in vBulletin 3.0.7:

Invalid SQL:
                                SELECT user.userid, user.username, user.posts, user.warning_bans,
                                userban.usergroupid, userban.displaygroupid, userban.customtitle, userban.usertitle,
                                IF(userban.userid, 1, 0) AS banrecord,
                                IF(usergroup.genericoptions & 32, 1, 0) AS isbannedgroup
                                FROM user AS user
                                INNER JOIN usergroup AS usergroup ON(usergroup.usergroupid = user.usergroupid)
                                LEFT JOIN userban AS userban ON(userban.userid = user.userid)
                                WHERE user.userid = 148
                       
mysql error: Unknown column 'user.warning_bans' in 'field list'

mysql error number: 1054

I've been scratching my head and can't figure it out.

Thanks

sv1cec 04-10-2005 11:20 AM

Well, obviously your user table does not have the needed columns.

Run this query:

describe user

Check that the following columns are defined:

`warnings` int(5) default '0'
`warning_level` int(15) default '0'
`warning_bans` int(2) default '0'

If they are not defined (why?), add them using the following query:

ALTER TABLE `".TABLE_PREFIX."user`
add `warnings` int(5) default '0',
add `warning_level` int(15) default '0',
add `warning_bans` int(2) default '0'

Remember to change the Table Prefix if you are using one.

Rgds

KimmiKat 04-10-2005 05:46 PM

This is going to sound dumb, but what is a "table Prefix?" My co-admin (who knows this stuff) started this modification before she left and I am so lost since I can't get a hold of her for help.

sv1cec 04-11-2005 06:01 AM

It's a prefix that is used in front of every table name. For example, in some installations, where the admin didn't want to leave the default naming alone, he may have added a table prefix like "vb_", in which every table in his database would start with those three letters. In other words, his user table will no longer be named user, but vb_user.

Rgds

KimmiKat 04-11-2005 06:04 PM

Thanks! I wasn't sure since my former co-admin did most of the work on the board.

sv1cec 04-12-2005 08:45 AM

No problem.


All times are GMT. The time now is 05:51 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.01147 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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