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-11-2012, 08:55 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database problems

Can anyone tell me how to rebuild this table, bear in mind I no next to nothing about databases, I have access to myphpadmin.

Database error in vBulletin 4.2.0:

Invalid SQL:

SELECT m.*,
d.firstpostid,
fp.title as discussiontitle,
fp.postuserid as discussionuserid,
fp.postusername as discussionusername,
fp.dateline as discussiondateline
FROM groupmessage AS m JOIN discussion d ON m.discussionid = d.discussionid JOIN groupmessage fp ON d.firstpostid = fp.gmid
WHERE m.gmid >= 0 AND m.gmid <= 0;

MySQL Error : Table 'reignofc_vb.discussion' doesn't exist
Error Number : 1146
Request Date : Saturday, August 11th 2012 @ 03:42:25 AM
Error Date : Saturday, August 11th 2012 @ 03:42:26 AM
Script : http://www.reign-of-chaos.co.uk/admi...0&indextypes=0
Referrer : http://www.reign-of-chaos.co.uk/admi...0&indextypes=0
Reply With Quote
  #2  
Old 08-11-2012, 11:36 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are missing the table you need add it
Reply With Quote
  #3  
Old 08-11-2012, 11:57 AM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
You are missing the table you need add it
yep guessed that what I need help wise, is instructions on how to add the table how many columns etc
Reply With Quote
  #4  
Old 08-11-2012, 01:01 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RoC wonko View Post
yep guessed that what I need help wise, is instructions on how to add the table how many columns etc
You can copy the structure of that table from the mysql-schema.php file in the install folder. Or if you have a recent back with that table in it, extract it from there.
Reply With Quote
  #5  
Old 08-11-2012, 01:47 PM
RoC wonko RoC wonko is offline
 
Join Date: Jun 2012
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by borbole View Post
You can copy the structure of that table from the mysql-schema.php file in the install folder. Or if you have a recent back with that table in it, extract it from there.
ok found the info needed but am struggling to build the table, get syntax error

$schema['CREATE']['query']['discussion'] = "
CREATE TABLE " . TABLE_PREFIX . "discussion (
discussionid INT unsigned NOT NULL auto_increment,
groupid INT unsigned NOT NULL,
firstpostid INT unsigned NOT NULL,
lastpostid INT unsigned NOT NULL,
lastpost INT unsigned NOT NULL,
lastposter VARCHAR(255) NOT NULL,
lastposterid INT unsigned NOT NULL,
visible INT unsigned NOT NULL default '0',
deleted INT unsigned NOT NULL default '0',
moderation INT unsigned NOT NULL default '0',
subscribers ENUM('0', '1') default '0',
PRIMARY KEY (discussionid),
KEY groupid (groupid, lastpost)
)

do not see how to input the bottom 2 rows of info
Reply With Quote
  #6  
Old 08-11-2012, 07:14 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Run this sql, I also uploaded the sql
This is from 4.1.12 I dont have 4.2 installed so check first to make sure no changes to that table before using
Code:
DROP TABLE IF EXISTS `discussion`;
CREATE TABLE `discussion` (
  `discussionid` int(10) unsigned NOT NULL auto_increment,
  `groupid` int(10) unsigned NOT NULL,
  `firstpostid` int(10) unsigned NOT NULL,
  `lastpostid` int(10) unsigned NOT NULL,
  `lastpost` int(10) unsigned NOT NULL,
  `lastposter` varchar(255) NOT NULL,
  `lastposterid` int(10) unsigned NOT NULL,
  `visible` int(10) unsigned NOT NULL default '0',
  `deleted` int(10) unsigned NOT NULL default '0',
  `moderation` int(10) unsigned NOT NULL default '0',
  `subscribers` enum('0','1') default '0',
  PRIMARY KEY  (`discussionid`),
  KEY `groupid` (`groupid`,`lastpost`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Attached Files
File Type: zip discussion.zip (428 Bytes, 1 views)
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 07:26 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.03618 seconds
  • Memory Usage 2,234KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete