Thread: VBleague
View Single Post
  #95  
Old 10-09-2005, 09:14 PM
Sooner95 Sooner95 is offline
 
Join Date: Apr 2003
Location: I don't know
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have ucash installed, works fine. I cant delete the tables, becuase it never creates them. I get syntax errors..

Quote:
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_news (
`newsid` int(5) NOT NULL,
`newstitle` varchar(50) NOT NULL default '',
`newsinfo` text NOT NULL,
`newsdate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`newsid`)
) TYPE=MyISAM");
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_settings (
`active` int(1) NOT NULL default '0',
`cashrow` varchar(20) NOT NULL default '',
`winners` tinyint(3) NOT NULL default '0',
`leaguesignupfee` int(10) NOT NULL default '50',
`makeateamfee` int(10) NOT NULL default '100'
) TYPE=MyISAM");
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_stats (
`userid` varchar(20) NOT NULL default '',
`username` varchar(30) NOT NULL default '',
`place` varchar(15) NOT NULL default 'Not Ranked Yet',
`rating` int(10) NOT NULL default '1500',
`gamewins` int(10) NOT NULL default '0',
`gamelosses` int(10) NOT NULL default '0',
`winstreak` int(10) NOT NULL default '0',
`lossestreak` int(10) NOT NULL default '0',
`teamid` tinyint(3) NOT NULL default '0',
`totalwins` int(11) NOT NULL default '0',
`totallosses` int(11) NOT NULL default '0'
) TYPE=MyISAM");
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_teams (
`teamid` INT( 20 ) NOT NULL AUTO_INCREMENT ,
`teamname` varchar(40) NOT NULL default '',
`teamdiscription` tinytext NOT NULL,
`teamimage` varchar(100) NOT NULL default 'images/league/noimage.gif',
`teamroll` varchar(50) NOT NULL default '',
`username` varchar(40) NOT NULL default '',
`teamuserid` int(11) NOT NULL default '0',
`teamwins` int(11) NOT NULL default '0',
`teamlosses` int(11) NOT NULL default '0',
PRIMARY KEY ( `teamid` )
) TYPE=MyISAM AUTO_INCREMENT=1");
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_tournament_reports (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`winnersname` varchar(100) NOT NULL default '',
`lossersname` varchar(100) NOT NULL default '',
`winreported` int(1) NOT NULL default '0',
`losereported` int(1) NOT NULL default '0',
PRIMARY KEY ( `id` )
) TYPE=MyISAM AUTO_INCREMENT=1");
$db->query("CREATE TABLE '.TABLE_PREFIX.'league_tournaments (
`tid` int(11) NOT NULL auto_increment,
`gamename` varchar(50) NOT NULL default '',
`numplayers` int(11) NOT NULL default '0',
`champion` varchar(100) NOT NULL default '',
`datestarted` datetime NOT NULL default '0000-00-00 00:00:00',
`forumlink` varchar(150) NOT NULL default '',
PRIMARY KEY ( `tid` )
) TYPE=MyISAM AUTO_INCREMENT=1");
$db->query("CREATE TABLE '.TABLE_PREFIX.'leaguetournament_players (
`playerid` int(5) NOT NULL default '0',
`tid` int(11) NOT NULL default '0',
`playerusername` varchar(50) NOT NULL default '',
`playerwins` int(11) NOT NULL default '0',
`playerlosses` int(11) NOT NULL default '0',
`round1` int(5) NOT NULL default '1',
`round2` int(2) NOT NULL default '0',
`round3` int(2) NOT NULL default '0',
`round4` int(2) NOT NULL default '0',
`champion` int(1) NOT NULL default '0',
`team` varchar(100) NOT NULL default ''
) TYPE=MyISAM");
$db->query("INSERT INTO '.TABLE_PREFIX.'league_news (newsid, newstitle, newsinfo, newsdate) VALUES (0, 'Vbleague Installed', 'Your League is now installed, We hope you will like this league addon to your site.', '')");
$db->query("INSERT INTO '.TABLE_PREFIX.'league_settings (`active`, `cashrow`, `winners`, `leaguesignupfee`, `makeateamfee`) VALUES (0, 'uttpoints', 5, 50, 100)");
Looking at other SQL (which i know very little about) and comparing them to this one. " before the table thats created instead of ' ?

Its wont create the tables at all, and of course it wont uninstall, beucase their are no tables to drop. I am hoping its just a typo in the SQL query..
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01082 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete