vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Database problems (https://vborg.vbsupport.ru/showthread.php?t=286527)

RoC wonko 08-11-2012 08:55 AM

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

ForceHSS 08-11-2012 11:36 AM

You are missing the table you need add it

RoC wonko 08-11-2012 11:57 AM

Quote:

Originally Posted by ForceHSS (Post 2356182)
You are missing the table you need add it

yep guessed that:D what I need help wise, is instructions on how to add the table how many columns etc

borbole 08-11-2012 01:01 PM

Quote:

Originally Posted by RoC wonko (Post 2356187)
yep guessed that:D 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.

RoC wonko 08-11-2012 01:47 PM

Quote:

Originally Posted by borbole (Post 2356200)
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

ForceHSS 08-11-2012 07:14 PM

1 Attachment(s)
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;



All times are GMT. The time now is 07:09 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.01298 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_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