Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 07:41 am EST

Geeklog Forums

Error i my geekary need help to MySql


Status: offline

Sniper12

Forum User
Regular Poster
Registered: 11/25/03
Posts: 81
Location:Denmark
My database crashed the other day, I have at copy of I form the day before, this is the backup.

Text Formatted Code
DROP TABLE IF EXISTS geeklog_geekary;
CREATE TABLE geeklog_geekary (
   version decimal(10,2) DEFAULT '1.00' NOT NULL,
   enable_ratings enum('0','1') DEFAULT '1' NOT NULL,
   enable_comments enum('0','1') DEFAULT '1' NOT NULL,
   enable_geekards enum('0','1') DEFAULT '1' NOT NULL,
   enable_downloads enum('0','1') DEFAULT '0' NOT NULL,
   rowsperpage tinyint(3) DEFAULT '1' NOT NULL,
   columnsperrow tinyint(4) DEFAULT '5' NOT NULL,
   gk_rows int(11) DEFAULT '10' NOT NULL,
   gk_cols int(11) DEFAULT '5' NOT NULL,
   geekage_types set('image/bmp','image/gif','image/pjpeg','image/jpeg','image/png','image/ x-png','audio/mpeg','audio/wav','application/x-shockwave-flash','video/mpe g','video/x-ms-wmv') NOT NULL,
   maxfilesize bigint(20) DEFAULT '2048000' NOT NULL,
   thumb_width int(5) DEFAULT '100' NOT NULL,
   thumb_height int(5) DEFAULT '100' NOT NULL,
   thumbnailer enum('GD','IM','NP') DEFAULT 'GD' NOT NULL,
   tnpath varchar(100) NOT NULL,
   tnextension enum('jpg','gif','png') DEFAULT 'png' NOT NULL,
   taction enum('0','1') DEFAULT '0' NOT NULL,
   max_width int(5) DEFAULT '127' NOT NULL,
   max_height int(5) DEFAULT '127' NOT NULL,
   image/gif text NOT NULL,
   image/png text NOT NULL,
   image/x-png text NOT NULL,
   image/jpeg text NOT NULL,
   image/pjpeg text NOT NULL,
   image/bmp text NOT NULL,
   application/x-shockwave-flash text NOT NULL,
   video/mpeg text NOT NULL,
   video/x-ms-wmv text NOT NULL,
   audio/mpeg text NOT NULL,
   audio/wav text NOT NULL,
   owner_id mediumint(8) DEFAULT '2' NOT NULL,
   group_id mediumint(8) DEFAULT '13' NOT NULL,
   perm_owner tinyint(1) DEFAULT '3' NOT NULL,
   perm_group tinyint(1) DEFAULT '3' NOT NULL,
   perm_member tinyint(1) DEFAULT '2' NOT NULL,
   perm_anon tinyint(1) DEFAULT '2' NOT NULL
);

 


But I get this error when I tray to oplade it to mysql.

Text Formatted Code
Error

SQL-forespørgsel :  

CREATE TABLE geeklog_geekary(

version decimal( 10, 2 ) DEFAULT '1.00' NOT NULL ,
enable_ratings enum( '0', '1' ) DEFAULT '1' NOT NULL ,
enable_comments enum( '0', '1' ) DEFAULT '1' NOT NULL ,
enable_geekards enum( '0', '1' ) DEFAULT '1' NOT NULL ,
enable_downloads enum( '0', '1' ) DEFAULT '0' NOT NULL ,
rowsperpage tinyint( 3 ) DEFAULT '1' NOT NULL ,
columnsperrow tinyint( 4 ) DEFAULT '5' NOT NULL ,
gk_rows int( 11 ) DEFAULT '10' NOT NULL ,
gk_cols int( 11 ) DEFAULT '5' NOT NULL ,
geekage_types set( 'image/bmp', 'image/gif', 'image/pjpeg', 'image/jpeg', 'image/png', 'image/x-png', 'audio/mpeg', 'audio/wav', 'application/x-shockwave-flash', 'video/mpeg', 'video/x-ms-wmv' ) NOT NULL ,
maxfilesize bigint( 20 ) DEFAULT '2048000' NOT NULL ,
thumb_width int( 5 ) DEFAULT '100' NOT NULL ,
thumb_height int( 5 ) DEFAULT '100' NOT NULL ,
thumbnailer enum( 'GD', 'IM', 'NP' ) DEFAULT 'GD' NOT NULL ,
tnpath varchar( 100 ) NOT NULL ,
tnextension enum( 'jpg', 'gif', 'png' ) DEFAULT 'png' NOT NULL ,
taction enum( '0', '1' ) DEFAULT '0' NOT NULL ,
max_width int( 5 ) DEFAULT '127' NOT NULL ,
max_height int( 5 ) DEFAULT '127' NOT NULL ,
image / gif text NOT NULL ,
image / png text NOT NULL ,
image / x - png text NOT NULL ,
image / jpeg text NOT NULL ,
image / pjpeg text NOT NULL ,
image / bmp text NOT NULL ,
application / x - shockwave - flash text NOT NULL ,
video / mpeg text NOT NULL ,
video / x - ms - wmv text NOT NULL ,
audio / mpeg text NOT NULL ,
audio / wav text NOT NULL ,
owner_id mediumint( 8 ) DEFAULT '2' NOT NULL ,
group_id mediumint( 8 ) DEFAULT '13' NOT NULL ,
perm_owner tinyint( 1 ) DEFAULT '3' NOT NULL ,
perm_group tinyint( 1 ) DEFAULT '3' NOT NULL ,
perm_member tinyint( 1 ) DEFAULT '2' NOT NULL ,
perm_anon tinyint( 1 ) DEFAULT '2' NOT NULL
)

MySQL returnerede:

#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 '/ gif text NOT  NULL ,
image / png text NOT  NULL ,
image / x -

 


I hope there I somebody there can help me.

Michael.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It was a bad idea of the Geekary author to use special characters in table names. You have to enclose them in backticks:

Text Formatted Code
`image/gif` text NOT NULL,
 


For future backups, make sure you have
Text Formatted Code
$_CONF['mysqldump_options'] = '-Q';
 
in your config.php. The -Q ensure that the table names are enclosed in backticks.

bye, Dirk
 Quote

Status: offline

Sniper12

Forum User
Regular Poster
Registered: 11/25/03
Posts: 81
Location:Denmark
Okay Thanks Dirk Very Happy
 Quote

All times are EST. The time is now 07:41 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content