Unknown SQL command ";", statement: 1

Discussion on a SQL Parser for EasyMOD
Locked
taifunbrowser
Registered User
Posts: 3
Joined: Fri Nov 17, 2006 11:45 pm

Unknown SQL command ";", statement: 1

Post by taifunbrowser »

The code:

Code: Select all

#
#-----[ SQL ]--------------------------------------------------------
# This Music Online will add 5 tables into your database.
#
# Copy the below code into phpMyAdmin (phpmyadmin.net)
# Please pay attention to the table prefix if you have specified
# something other than phpbb_ for your board's prefix.
#####################################################################

#
# Table structure for table `phpbb_music`
#

CREATE TABLE forums_music (
  song_id int(11) unsigned NOT NULL auto_increment,
  song_filename varchar(255) NOT NULL default '',
  song_imagename varchar(255) NOT NULL default '',
  song_title varchar(255) NOT NULL default '',
  song_url varchar(255) NOT NULL default '',
  song_desc text,
  song_writer varchar(255) NOT NULL default '',
  band_website varchar(255) NOT NULL default '',
  song_user_id mediumint(8) NOT NULL default '0',
  song_username varchar(32) default NULL,
  song_user_ip varchar(8) NOT NULL default '0',
  song_time int(11) unsigned NOT NULL default '0',
  song_cat_id mediumint(8) unsigned NOT NULL default '1',
  song_view_count int(11) unsigned NOT NULL default '0',
  song_lock tinyint(3) NOT NULL default '0',
  song_approval tinyint(3) NOT NULL default '1',
  song_download_count varchar(255) NOT NULL default '0',
  song_dl_enable TINYINT( 3 ) DEFAULT '1' NOT NULL,
  PRIMARY KEY  (song_id),
  KEY song_cat_id (song_cat_id),
  KEY song_user_id (song_user_id),
  KEY song_time (song_time)
) TYPE=MyISAM AUTO_INCREMENT=18 ;


# --------------------------------------------------------

#
# Table structure for table `phpbb_music_cat`
#

CREATE TABLE forums_music_cat (
  `cat_id` mediumint(8) unsigned NOT NULL auto_increment,
  `cat_title` varchar(255) NOT NULL default '',
  `cat_desc` text,
  `cat_order` mediumint(8) NOT NULL default '0',
  `cat_view_level` tinyint(3) NOT NULL default '-1',
  `cat_upload_level` tinyint(3) NOT NULL default '0',
  `cat_rate_level` tinyint(3) NOT NULL default '0',
  `cat_comment_level` tinyint(3) NOT NULL default '0',
  `cat_edit_level` tinyint(3) NOT NULL default '0',
  `cat_delete_level` tinyint(3) NOT NULL default '2',
  `cat_view_groups` varchar(255) default NULL,
  `cat_upload_groups` varchar(255) default NULL,
  `cat_rate_groups` varchar(255) default NULL,
  `cat_comment_groups` varchar(255) default NULL,
  `cat_edit_groups` varchar(255) default NULL,
  `cat_delete_groups` varchar(255) default NULL,
  `cat_moderator_groups` varchar(255) default NULL,
  `cat_approval` tinyint(3) NOT NULL default '0',
  `cat_random` tinyint(3) NOT NULL default '1',
  PRIMARY KEY  (`cat_id`),
  KEY `cat_order` (`cat_order`)
) TYPE=MyISAM AUTO_INCREMENT=4 ;

#
# Dumping data for table `phpbb_music_cat`
#

INSERT INTO forums_music_cat VALUES (4, 'Test Category 1', 'Go into your Admin Control Panel and add more categories.', 10, -1, 0, 0, 0, 0, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0,1);
 
# --------------------------------------------------------

#
# Table structure for table `phpbb_music_comment`
#

CREATE TABLE forums_music_comment (
  comment_id int(11) unsigned NOT NULL auto_increment,
  comment_song_id int(11) unsigned NOT NULL default '0',
  comment_user_id mediumint(8) NOT NULL default '0',
  comment_username varchar(32) default NULL,
  comment_user_ip varchar(8) NOT NULL default '',
  comment_time int(11) unsigned NOT NULL default '0',
  comment_text text,
  comment_edit_time int(11) unsigned default NULL,
  comment_edit_count smallint(5) unsigned NOT NULL default '0',
  comment_edit_user_id mediumint(8) default NULL,
  PRIMARY KEY  (comment_id),
  KEY `comment_song_id` (`comment_song_id`),
  KEY `comment_user_id` (`comment_user_id`),
  KEY `comment_user_ip` (`comment_user_ip`),
  KEY `comment_time` (`comment_time`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;


# --------------------------------------------------------

#
# Table structure for table `phpbb_music_config`
#

CREATE TABLE forums_music_config (
  `config_name` varchar(255) NOT NULL default '',
  `config_value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`config_name`)
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_music_config`
#

INSERT INTO `forums_music_config` VALUES ('max_songs', '1024');
INSERT INTO `forums_music_config` VALUES ('user_songs_limit', '50');
INSERT INTO `forums_music_config` VALUES ('mod_songs_limit', '250');
INSERT INTO `forums_music_config` VALUES ('max_file_size', '5145728');
INSERT INTO `forums_music_config` VALUES ('rows_per_page', '20');
INSERT INTO `forums_music_config` VALUES ('cols_per_page', '1');
INSERT INTO `forums_music_config` VALUES ('top', '5');
INSERT INTO `forums_music_config` VALUES ('sort_method', 'song_time');
INSERT INTO `forums_music_config` VALUES ('sort_order', 'DESC');
INSERT INTO `forums_music_config` VALUES ('mp3_allowed', '0');
INSERT INTO `forums_music_config` VALUES ('wav_allowed', '0');
INSERT INTO `forums_music_config` VALUES ('wma_allowed', '0');
INSERT INTO `forums_music_config` VALUES ('desc_length', '512000');
INSERT INTO `forums_music_config` VALUES ('hotlink_prevent', '0');
INSERT INTO `forums_music_config` VALUES ('hotlink_allowed', 'cfmanager.net.tf');
INSERT INTO `forums_music_config` VALUES ('rate', '1');
INSERT INTO `forums_music_config` VALUES ('rate_scale', '5');
INSERT INTO `forums_music_config` VALUES ('comment', '1');
INSERT INTO `forums_music_config` VALUES ('music_version', '.0.6 beta');
INSERT INTO `forums_music_config` VALUES ('download', '1');
INSERT INTO `forums_music_config` VALUES ('max_image_size', '100000');
INSERT INTO `forums_music_config` VALUES ('max_image_width', '500');
INSERT INTO `forums_music_config` VALUES ('max_image_height', '500');
INSERT INTO `forums_music_config` VALUES ('random_allowed', '0');

# --------------------------------------------------------

#
# Table structure for table `phpbb_music_rate`
#

CREATE TABLE forums_music_rate (
  `rate_song_id` int(11) unsigned NOT NULL default '0',
  `rate_user_id` mediumint(8) NOT NULL default '0',
  `rate_user_ip` char(8) NOT NULL default '',
  `rate_point` tinyint(3) unsigned NOT NULL default '0',
  KEY `rate_song_id` (`rate_song_id`),
  KEY `rate_user_id` (`rate_user_id`),
  KEY `rate_user_ip` (`rate_user_ip`),
  KEY `rate_point` (`rate_point`)
) TYPE=MyISAM;
I know, its gooey, its a music mod, and I'm sorry for making you want to look at this, even though I see the forums being saturated with people wanting to play music on their page.

But its important to us: we run a DDR SIMFILING community, and we have forums of ddr stepfile packs. We want people to be able to hear the songs before they dance to them, as its normally that they want to hear them first.

We want to make a [stream](or something close) bbcode so that people can post a song in a small media player, and osmeone can hit "play", and it plays.

This bbcode will often be used inside
  • 's and inside [hide]'s (the javascript one) because we like long complex threads with nested bbcodes and the like.

    So.

    The normal part of the music online mod easymods fine, but the sql goes crazy. I am not confident to install sql myself, so here is my error message:

    Code: Select all

     
    SQL PROCESSING ERROR:
    No SQL alterations will be performed. However, you may skip SQL processing, continue installing the MOD, and deal with the SQL manually
    
    The following error occured:
    
    Error:
    Unknown SQL command ";", statement: 1
    
    SQL:
     
    Just great, isnt it? it says nothing at all! is this how the debugger works!?

    help wanted.

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Unknown SQL command ";", statement: 1

Post by Nightrider »

Other than a lot of unnecessary clutter, I don't see any real problems with the SQL queries that you posted above. You might want to remove all the clutter between the SQL statements that begin with #. Also, some databases don't like this part: TYPE=MyISAM AUTO_INCREMENT=18, so you might want to remove that too on the CREATE TABLE queries...

What version of EM are you using???

Image

Locked