vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problem with database in usergroups (https://vborg.vbsupport.ru/showthread.php?t=123433)

idnpros 08-08-2006 08:50 PM

Problem with database in usergroups
 
I think that after a friend installed a hack (thanks hacks i think its called) i keep having problems in the admincp when try to manage usergroups.

When i hit save, i get this error

Code:

Code:

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
    `title` = 'New Member',
    `description` = 'Imported group',
    `usertitle` = '',
    `opentag` = '',
    `closetag` = '',
    `passwordexpires` = '0',
    `passwordhistory` = '0',
    `ispublicgroup` = '0',
    `canoverride` = '0',
    `forumpermissions` = '577791',
    `attachlimit` = '0',
    `pmquota` = '200',
    `pmpermissions` = '0',
    `pmsendmax` = '0',
    `calendarpermissions` = '3',
    `wolpermissions` = '1',
    `adminpermissions` = '0',
    `genericpermissions` = '201332647',
    `genericoptions` = '0',
    `profilepicmaxwidth` = '0',
    `profilepicmaxheight` = '0',
    `profilepicmaxsize` = '0',
    `avatarmaxwidth` = '0',
    `avatarmaxheight` = '0',
    `avatarmaxsize` = '0',
    `photoplogpermissions` = '5071',
    `photoplogmaxfilesize` = '512000',
    `photoplogmaxfilelimit` = '100',
    `arcadepermissions` = '15',
    `journalpermissions` = '34527',
    `vbppermissions` = '46993',
    `vbp_discountrate` = '0.00000',
    `vbp_paycheckamount` = '0.00000',
    `vbp_secondarycost` = '0.00000',
    `vbp_primarycost` = '0.00000',
    `hhroptions` = '0'
WHERE usergroupid=11;

MySQL Error  : Unknown column 'hhroptions' in 'field list'
Error Number : 1054
Date        : Tuesday, August 8th 2006 @ 04:02:42 PM
Script      : admincp/usergroup.php
Referrer    : admincp/usergroup.php?do=edit&usergroupid=11
IP Address  : 200.126.232.173
Username    : Huron
Classname    : vb_database


How can i fix this problem?

Also another small question. Is there a way to move all users from a usergroup to another?

Thanks in advance for the support

Paul M 08-08-2006 09:17 PM

hhroptions is the Hide Hack Resurrection mod, I guess you have uninstalled that recently but not removed all the files associated with it. You need to remove the "bitfield_psionic_hide.xml" from your includes/xml folder.

idnpros 08-08-2006 09:29 PM

Thanks a lot mate, that fixed that problem
And about the merging of usergroupd?
do you have any idea how to do it?
because i imported usergroups when imported from ipb
but now i want to reorder them into the vbulletin usergroups

Paul M 08-08-2006 09:34 PM

The quickest (possibly only) way to do that is by running direct SQL updates ;

Code:

UPDATE user SET usergroupid = x WHERE usergroupid = y
x = new usergroup number, y = old usergroup number

Cky47 08-08-2006 10:26 PM

Ok i am the one helping him and it is giving methis error also.

Code:

Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
        (`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
        ('1', '5', 'Post Thank You  Hank', 'admin_maintenance', 'if ($_REQUEST[\'do\'] == \'chooser\')\r\n{\r\n        print_form_header(\'misc\', \'post_thanks_user_amount\');\r\n        print_table_header($vbphrase[\'post_thanks_user_amount\'], 2, 0);\r\n        print_description_row($vbphrase[\'post_thanks_user_amount_help\']);\r\n        print_input_row($vbphrase[\'number_of_users_to_process_per_cycle\'], \'perpage\', 1000);\r\n        print_submit_row($vbphrase[\'post_thanks_user_amount\']);\r\n\r\n        print_form_header(\'misc\', \'post_thanks_thanked_posts\');\r\n        print_table_header($vbphrase[\'post_thanks_thanked_posts\'], 2, 0);\r\n        print_description_row($vbphrase[\'post_thanks_thanked_posts_help\']);\r\n        print_input_row($vbphrase[\'number_of_users_to_process_per_cycle\'], \'perpage\', 1000);\r\n        print_submit_row($vbphrase[\'post_thanks_thanked_posts\']);\r\n\r\n        print_form_header(\'misc\', \'post_thanks_thanked_times\');\r\n        print_table_header($vbphrase[\'post_thanks_thanked_times\'], 2, 0);\r\n        print_description_row($vbphrase[\'post_thanks_thanked_times_help\']);\r\n        print_input_row($vbphrase[\'number_of_users_to_process_per_cycle\'], \'perpage\', 1000);\r\n        print_submit_row($vbphrase[\'post_thanks_thanked_times\']);\r\n        \r\n        print_form_header(\'misc\', \'post_thanks_post_amount\');\r\n        print_table_header($vbphrase[\'post_thanks_post_amount\'], 2, 0);\r\n        print_description_row($vbphrase[\'post_thanks_post_amount_help\']);\r\n        print_input_row($vbphrase[\'number_of_posts_to_process_per_cycle\'], \'perpage\', 1000);\r\n        print_submit_row($vbphrase[\'post_thanks_post_amount\']);\r\n}\r\n\r\nif ($_REQUEST[\'do\'] == \'post_thanks_user_amount\')\r\n{\r\n        if (empty($vbulletin->GPC[\'perpage\']))\r\n        {\r\n                $vbulletin->GPC[\'perpage\'] = 1000;\r\n        }\r\n\r\n        $finishat = $vbulletin->GPC[\'startat\'] + $vbulletin->GPC[\'perpage\'];\r\n\r\n        echo \'<p>\' . $vbphrase[\'post_thanks_user_amount\'] . \'</p>\';\r\n\r\n        $users = $db->query_read(\"\r\n                SELECT *\r\n                FROM \" . TABLE_PREFIX . \"user\r\n                WHERE userid >= \" . $vbulletin->GPC[\'startat\'] . \" AND userid < $finishat\r\n                ORDER BY userid\r\n        \");\r\n        while ($user = $db->fetch_array($users))\r\n        {\r\n                $total = $db->query_first(\"\r\n                        SELECT COUNT(*) AS post_thanks_user_amount FROM \" . TABLE_PREFIX . \"post_thanks\r\n                        WHERE userid = $user[userid]\r\n                \");\r\n\r\n        if (!($total[post_thanks_user_amount]))\r\n        {\r\n          $total[post_thanks_user_amount] = 0;\r\n        }\r\n\r\n                $db->query_write(\"\r\n            UPDATE \" . TABLE_PREFIX . \"user\r\n            SET post_thanks_user_amount = $total[post_thanks_user_amount]\r\n            WHERE userid = $user[userid]\r\n            \");\r\n\r\n                echo construct_phrase($vbphrase[\'processing_x\'], $user[\'userid\']) . \"<br />\\n\";\r\n                vbflush();\r\n        }\r\n\r\n        if ($checkmore = $db->query_first(\"SELECT userid FROM \" . TABLE_PREFIX . \"user WHERE userid >= $finishat LIMIT 1\"))\r\n        {\r\n                print_cp_redirect(\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_user_amount&startat=$finishat&pp=\" . $vbulletin->GPC[\'perpage\']);\r\n                echo \"<p><a href=\\\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_user_amount&amp;startat=$finishat&amp;pp=\" . $vbulletin->GPC[\'perpage\'] . \"\\\">\" . $vbphrase[\'click_here_to_continue_processing\'] . \"</a></p>\";\r\n        }\r\n        else\r\n        {\r\n                define(\'CP_REDIRECT\', \'misc.php\');\r\n                print_stop_message(\'updated_post_counts_successfully\');\r\n        }\r\n}\r\n\r\nif ($_REQUEST[\'do\'] == \'post_thanks_thanked_posts\')\r\n{\r\n        if (empty($vbulletin->GPC[\'perpage\']))\r\n        {\r\n                $vbulletin->GPC[\'perpage\'] = 1000;\r\n        }\r\n\r\n        $finishat = $vbulletin->GPC[\'startat\'] + $vbulletin->GPC[\'perpage\'];\r\n\r\n        echo \'<p>\' . $vbphrase[\'post_thanks_thanked_posts\'] . \'</p>\';\r\n\r\n        $users = $db->query_read(\"\r\n                SELECT *\r\n                FROM \" . TABLE_PREFIX . \"user\r\n                WHERE userid >= \" . $vbulletin->GPC[\'startat\'] . \" AND userid < $finishat\r\n                ORDER BY userid\r\n        \");\r\n        while ($user = $db->fetch_array($users))\r\n        {\r\n                $total = $db->query_first(\"\r\n                        SELECT COUNT(*) AS post_thanks_thanked_posts FROM \" . TABLE_PREFIX . \"post\r\n                        WHERE userid = $user[userid] AND post_thanks_amount > 0\r\n                \");\r\n\r\n        if (!($total[post_thanks_thanked_posts]))\r\n        {\r\n          $total[post_thanks_thanked_posts] = 0;\r\n        }\r\n\r\n                $db->query_write(\"\r\n            UPDATE \" . TABLE_PREFIX . \"user\r\n            SET post_thanks_thanked_posts = $total[post_thanks_thanked_posts]\r\n            WHERE userid = $user[userid]\r\n            \");\r\n\r\n                echo construct_phrase($vbphrase[\'processing_x\'], $user[\'userid\']) . \"<br />\\n\";\r\n                vbflush();\r\n        }\r\n\r\n        if ($checkmore = $db->query_first(\"SELECT userid FROM \" . TABLE_PREFIX . \"user WHERE userid >= $finishat LIMIT 1\"))\r\n        {\r\n                print_cp_redirect(\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_thanked_posts&startat=$finishat&pp=\" . $vbulletin->GPC[\'perpage\']);\r\n                echo \"<p><a href=\\\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_thanked_posts&amp;startat=$finishat&amp;pp=\" . $vbulletin->GPC[\'perpage\'] . \"\\\">\" . $vbphrase[\'click_here_to_continue_processing\'] . \"</a></p>\";\r\n        }\r\n        else\r\n        {\r\n                define(\'CP_REDIRECT\', \'misc.php\');\r\n                print_stop_message(\'updated_post_counts_successfully\');\r\n        }\r\n}\r\n\r\nif ($_REQUEST[\'do\'] == \'post_thanks_thanked_times\')\r\n{\r\n        if (empty($vbulletin->GPC[\'perpage\']))\r\n        {\r\n                $vbulletin->GPC[\'perpage\'] = 1000;\r\n        }\r\n\r\n        $finishat = $vbulletin->GPC[\'startat\'] + $vbulletin->GPC[\'perpage\'];\r\n\r\n        echo \'<p>\' . $vbphrase[\'post_thanks_thanked_times\'] . \'</p>\';\r\n\r\n        $users = $db->query_read(\"\r\n                SELECT *\r\n                FROM \" . TABLE_PREFIX . \"user\r\n                WHERE userid >= \" . $vbulletin->GPC[\'startat\'] . \" AND userid < $finishat\r\n                ORDER BY userid\r\n        \");\r\n        while ($user = $db->fetch_array($users))\r\n        {\r\n                $total = $db->query_first(\"\r\n                        SELECT SUM(post_thanks_amount) AS post_thanks_thanked_times FROM \" . TABLE_PREFIX . \"post\r\n                        WHERE userid = $user[userid] AND post_thanks_amount > 0\r\n                \");\r\n\r\n        if (!($total[post_thanks_thanked_times]))\r\n        {\r\n          $total[post_thanks_thanked_times] = 0;\r\n        }\r\n\r\n                $db->query_write(\"\r\n            UPDATE \" . TABLE_PREFIX . \"user\r\n            SET post_thanks_thanked_times = $total[post_thanks_thanked_times]\r\n            WHERE userid = $user[userid]\r\n            \");\r\n\r\n                echo construct_phrase($vbphrase[\'processing_x\'], $user[\'userid\']) . \"<br />\\n\";\r\n                vbflush();\r\n        }\r\n\r\n\r\n        if ($checkmore = $db->query_first(\"SELECT userid FROM \" . TABLE_PREFIX . \"user WHERE userid >= $finishat LIMIT 1\"))\r\n        {\r\n                print_cp_redirect(\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_thanked_times&startat=$finishat&pp=\" . $vbulletin->GPC[\'perpage\']);\r\n                echo \"<p><a href=\\\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_thanked_times&amp;startat=$finishat&amp;pp=\" . $vbulletin->GPC[\'perpage\'] . \"\\\">\" . $vbphrase[\'click_here_to_continue_processing\'] . \"</a></p>\";\r\n        }\r\n        else\r\n        {\r\n                define(\'CP_REDIRECT\', \'misc.php\');\r\n                print_stop_message(\'updated_post_counts_successfully\');\r\n        }\r\n}\r\n\r\nif ($_REQUEST[\'do\'] == \'post_thanks_post_amount\')\r\n{\r\n        if (empty($vbulletin->GPC[\'perpage\']))\r\n        {\r\n                $vbulletin->GPC[\'perpage\'] = 1000;\r\n        }\r\n\r\n        $finishat = $vbulletin->GPC[\'startat\'] + $vbulletin->GPC[\'perpage\'];\r\n\r\n        echo \'<p>\' . $vbphrase[\'post_thanks_post_amount\'] . \'</p>\';\r\n\r\n        $posts = $db->query_read(\"\r\n                SELECT *\r\n                FROM \" . TABLE_PREFIX . \"post\r\n                WHERE postid >= \" . $vbulletin->GPC[\'startat\'] . \" AND postid < $finishat\r\n                ORDER BY postid\r\n        \");\r\n        while ($post = $db->fetch_array($posts))\r\n        {\r\n                $total = $db->query_first(\"\r\n                        SELECT COUNT(*) AS post_thanks_amount FROM \" . TABLE_PREFIX . \"post_thanks\r\n                        WHERE postid = $post[postid]\r\n                \");\r\n\r\n        if (!($total[post_thanks_amount]))\r\n        {\r\n          $total[post_thanks_amount] = 0;\r\n        }\r\n\r\n                $db->query_write(\"\r\n            UPDATE \" . TABLE_PREFIX . \"post\r\n            SET post_thanks_amount = $total[post_thanks_amount]\r\n            WHERE postid = $post[postid]\r\n            \");\r\n\r\n                echo construct_phrase($vbphrase[\'processing_x\'], $post[\'postid\']) . \"<br />\\n\";\r\n                vbflush();\r\n        }\r\n\r\n\r\n        if ($checkmore = $db->query_first(\"SELECT postid FROM \" . TABLE_PREFIX . \"post WHERE postid >= $finishat LIMIT 1\"))\r\n        {\r\n                print_cp_redirect(\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_post_amount&startat=$finishat&pp=\" . $vbulletin->GPC[\'perpage\']);\r\n                echo \"<p><a href=\\\"misc.php?\" . $vbulletin->session->vars[\'sessionurl\'] . \"do=post_thanks_post_amount&amp;startat=$finishat&amp;pp=\" . $vbulletin->GPC[\'perpage\'] . \"\\\">\" . $vbphrase[\'click_here_to_continue_processing\'] . \"</a></p>\";\r\n        }\r\n        else\r\n        {\r\n                define(\'CP_REDIRECT\', \'misc.php\');\r\n                print_stop_message(\'updated_post_counts_successfully\');\r\n        }\r\n}', 'post_thanks');

MySQL Error  : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date        : Tuesday, August 8th 2006 @ 06:01:49 PM
Script      : http://www.youngmoneyweb.com/board/admincp/plugin.php
Referrer    : http://www.youngmoneyweb.com/board/admincp/plugin.php?do=productadd
IP Address  : 24.239.216.190
Username    : Huron
Classname    : vb_database



All times are GMT. The time now is 02:53 PM.

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.00982 seconds
  • Memory Usage 1,792KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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