Author Topic: MySQL Quory Error?  (Read 1838 times)

Offline Inside Sin

MySQL Quory Error?
« on: May 03, 2008, 10:07:46 am »
I'm trying to restore the forum's shop. But it keeps giving this error:

I'm quorying this:


Code: [Select]
#
# Table structure for table `smf_shop_items`
#

DROP TABLE IF EXISTS `smf_shop_items`;

CREATE TABLE `smf_shop_items` (
  id int(10) unsigned NOT NULL auto_increment,
  name varchar(50) NOT NULL default '',
  desc text NOT NULL default '',
  price decimal(8,2) unsigned NOT NULL default '',
  module tinytext NOT NULL default '',
  stock smallint(6) NOT NULL default '',
  info1 text NOT NULL default '',
  info2 text NOT NULL default '',
  info3 text NOT NULL default '',
  info4 text NOT NULL default '',
  input_needed tinyint(3) unsigned NOT NULL default 1,
  can_use_item tinyint(3) unsigned NOT NULL default 1,
  delete_after_use tinyint(1) unsigned NOT NULL default 1,
  image tinytext NOT NULL default '',
  category smallint(6) NOT NULL default '',
  PRIMARY KEY (id)
) TYPE=MyISAM;

#
# Dumping data in `smf_shop_items`
#

INSERT INTO `smf_shop_items`
(`id`, `name`, `desc`, `price`, `module`, `stock`, `info1`, `info2`, `info3`, `info4`, `input_needed`, `can_use_item`, `delete_after_use`, `image`, `category`)
VALUES (2, 'Gamble [ Child\'s Play ]', 'Gamble for a random amount of money, between 25 - 75!', 50.00, 'RandomMoney', 0, 25, 75, '', '', 0, 1, 1, 'Moneys.gif', 0),
(5, 'Change Username', 'Change your Username!', 50.00, 'ChangeUsername', 45, '', '', '', '', 1, 1, 1, 'iBook.gif', 0),
(6, 'Change User Title', 'Change your User Title', 50.00, 'ChangeUserTitle', 27, '', '', '', '', 1, 1, 1, 'iBook.gif', 0),
(10, 'Steal Credits', 'Try to steal credits from another member!', 500.00, 'Steal', 42, 40, '', '', '', 1, 1, 1, 'Claspknife.gif', 0),
(11, '[Collect] Rock', 'Well.... It does nothing', 50.00, 'Rock', 43, '', '', '', '', 0, 0, 0, 'Dousojin.gif', 2),
(13, 'Sticky Topic', 'Make any one of your topics a sticky!', 1000.00, 'StickyTopic', 25, '', '', '', '', 1, 1, 1, 'iBook.gif', 0),
(15, 'Increase Reputation by 5', 'Increases your official reputation by 5 points. Can be removed if used wrong.', 1000.00, 'IncreaseKarma', 23, 5, '', '', '', 0, 1, 1, 'iBook.gif', 0),
(16, 'Gamble [ Feel Lucky ]', 'Gamble some extra cash, get a random amount of money, between 250 - 800!', 500.00, 'RandomMoney', 8, 250, 800, '', '', 0, 1, 1, 'Moneys.gif', 0),
(14, 'Change Display Name', 'Change your display name!', 250.00, 'ChangeDisplayName', 42, 3, '', '', '', 1, 1, 1, 'iBook.gif', 0),
(17, 'Gamble [ Life Savings ]', 'WOW! You need to win big this time! Get between 2000 - 4000', 3000.00, 'RandomMoney', 50, 2000, 4000, '', '', 0, 1, 1, 'Moneys.gif', 0);
# --------------------------------------------------------

I get this error:

Code: [Select]
Error

SQL query:

CREATE TABLE `smf_shop_items` (
id int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
name varchar( 50 ) NOT NULL default '',
DESC text NOT NULL default '',
price decimal( 8, 2 ) unsigned NOT NULL default '',
module tinytext NOT NULL default '',
stock smallint( 6 ) NOT NULL default '',
info1 text NOT NULL default '',
info2 text NOT NULL default '',
info3 text NOT NULL default '',
info4 text NOT NULL default '',
input_needed tinyint( 3 ) unsigned NOT NULL default 1,
can_use_item tinyint( 3 ) unsigned NOT NULL default 1,
delete_after_use tinyint( 1 ) unsigned NOT NULL default 1,
image tinytext NOT NULL default '',
category smallint( 6 ) NOT NULL default '',
PRIMARY KEY ( id )
) 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 'desc text NOT NULL default '',
  price decimal(8,2) unsigned NOT NULL default '' at line 4

Thanks.