Advertisement:

Author Topic: SQL Database Error  (Read 603 times)

Offline JayinGR

  • Semi-Newbie
  • *
  • Posts: 91
    • Credit Problems
SQL Database Error
« on: February 22, 2010, 04:49:58 PM »
I am trying to import a BU of my SQL database and I keep getting this error.

Quote
SQL query:

CREATE TABLE `smf_3log_digest` (
id_topic mediumint( 8 ) unsigned NOT NULL default,
id_msg int( 10 ) unsigned NOT NULL default,
note_type varchar( 10 ) NOT NULL default 'post',
daily smallint( 3 ) unsigned NOT NULL default 0,
exclude mediumint( 8 ) unsigned NOT NULL default 0
) TYPE = MYISAM ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
  id_msg int(10) unsigned NOT NULL default ,
  note_type varchar(10) NOT NULL' at line 2

Can anyone help?  Thank You

OK I fixed that as I found my old post here:  http://www.simplemachines.org/community/index.php?topic=358706.msg2444544#msg2444544

Now I fixed that and I tried to upload it and I get this error:

Quote
SQL query:

CREATE TABLE `smf_3log_reported_comments` (
id_comment mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
id_report mediumint( 8 ) NOT NULL default 0,
id_member mediumint( 8 ) NOT NULL default,
membername varchar( 255 ) NOT NULL default '',
COMMENT varchar( 255 ) NOT NULL default '',
time_sent int( 10 ) NOT NULL default,
PRIMARY KEY ( id_comment ) ,
KEY id_report( id_report ) ,
KEY id_member( id_member ) ,
KEY time_sent( time_sent )
) TYPE = MYISAM ;
« Last Edit: February 22, 2010, 05:20:00 PM by JayinGR »

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: SQL Database Error
« Reply #1 on: March 04, 2010, 09:46:19 PM »
Is that table from some mod? If so, you might want to post in the mod's support topic for more assistance if the below still won't fix it.

Try changing it to the following:

Code: [Select]
CREATE TABLE `smf_3log_reported_comments` (
id_comment mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
id_report mediumint( 8 ) NOT NULL default 0,
id_member mediumint( 8 ) NOT NULL,
membername varchar( 255 ) NOT NULL default '',
COMMENT varchar( 255 ) NOT NULL default '',
time_sent int( 10 ) NOT NULL,
PRIMARY KEY ( id_comment ) ,
KEY id_report( id_report ) ,
KEY id_member( id_member ) ,
KEY time_sent( time_sent )
) TYPE = MYISAM ;