PDA

View Full Version : errore db


phpone
04-16-2007, 07:32 PM
ho un problema con l'esyndicat pro
ho fatto un backup del db per poter fare alcuni lavoretti sul database
ora vado a ripristinare il backup del db e sia esyndicat che phpmyadmin mi danno un errore di sintassi e non mi fanno caricare il db

questo e' l'errore
Errore

query SQL:
CREATE TABLE `v2102_categories` ( `id` int( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
`id_editor` int( 8 ) NOT NULL DEFAULT '0',
`id_parent` int( 8 ) NOT NULL DEFAULT '0',
`title` varchar( 255 ) NOT NULL ,
`description` text NOT NULL ,
`status` enum( 'approval', 'active' ) NOT NULL DEFAULT 'approval',
`meta_description` tinytext NOT NULL ,
`meta_keywords` tinytext NOT NULL ,
`path` varchar( 250 ) NOT NULL ,
`order` smallint( 10 ) NOT NULL DEFAULT '0',
`locked` enum( '0', '1' ) NOT NULL DEFAULT '0',
`unique_tpl` enum( '0', '1' ) NOT NULL DEFAULT '0',
`level` smallint( 6 ) NOT NULL DEFAULT '1',
`num_cols` tinyint( 2 ) unsigned,
`neighbour` tinyint( 4 ) ,
`num_links` int( 8 ) NOT NULL DEFAULT '0',
`num_all_links` int( 8 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( id ) ,
KEY id_parent( id_parent ) ,
KEY STATUS ( STATUS ) ,
KEY path( path ) ,
KEY ORDER ( ORDER )
);


Messaggio di MySQL:
#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 'order (order)
)' at line 23

phpone
04-22-2007, 05:56 PM
continuo a ricevere lo stesso errore :sos: :cry:

Michael Hill
04-23-2007, 05:43 AM
Hi, check the syntax:

............................
PRIMARY KEY (`id`),
KEY `id_parent` (`id_parent`),
KEY `status` (`status`),
KEY `path` (`path`),
KEY `order` (`order`)
..............................

ludin
04-27-2007, 07:50 PM
what do you mean by that.. can you explain..

thanks.

phpone
04-28-2007, 03:49 PM
query SQL:

CREATE TABLE `v2102_links` (
`id` int( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
`id_editor` int( 8 ) NOT NULL DEFAULT '0',
`domain` varchar( 150 ) ,
`url` varchar( 150 ) NOT NULL ,
`description` text NOT NULL ,
`email` varchar( 100 ) NOT NULL ,
`reciprocal` varchar( 150 ) NOT NULL DEFAULT 'http://',
`recip_valid` enum( '0', '1' ) NOT NULL DEFAULT '0',
`ip_address` varchar( 15 ) NOT NULL ,
`link_header` int( 4 ) NOT NULL DEFAULT '0',
`status` enum( 'approval', 'banned', 'suspended', 'active' ) NOT NULL DEFAULT 'approval',
`pagerank` tinyint( 2 ) NOT NULL DEFAULT '-1',
`rank` tinyint( 3 ) NOT NULL DEFAULT '0',
`date` datetime,
`owner` int( 8 ) NOT NULL DEFAULT '0',
`comment` mediumtext NOT NULL ,
`clicks` int( 10 ) unsigned NOT NULL DEFAULT '0',
`partner` enum( '0', '1' ) NOT NULL DEFAULT '0',
`partners_start` datetime,
`featured` enum( '0', '1' ) NOT NULL DEFAULT '0',
`feature_start` datetime,
`sponsored` enum( '0', '1' ) NOT NULL DEFAULT '0',
`sponsored_start` datetime,
`sponsored_plan_id` int( 11 ) ,
`sponsored_tid` varchar( 255 ) ,
`comments_active` int( 11 ) NOT NULL DEFAULT '0',
`comments_total` int( 11 ) NOT NULL DEFAULT '0',
`num_votes` int( 11 ) NOT NULL DEFAULT '0',
`rating` float NOT NULL DEFAULT '0',
`min_rating` int( 11 ) NOT NULL DEFAULT '0',
`max_rating` int( 11 ) NOT NULL DEFAULT '0',
`title` varchar( 200 ) NOT NULL ,
`last_check_date` datetime,
`cron_cycle` enum( '0', '1' ) NOT NULL DEFAULT '0',
`sponsored_notif_sent` enum( '0', '1' ) NOT NULL DEFAULT '0',
`notif_sent_date` datetime,
PRIMARY KEY ( id ) ,
KEY date( date ) ,
KEY recip_valid( recip_valid ) ,
KEY link_header( link_header ) ,
KEY STATUS ( STATUS ) ,
KEY featured( featured ) ,
KEY sponsored( sponsored ) ,
KEY partner( partner ) ,
KEY url( url, description )
);

Messaggio di MySQL: Documentazione
#1170 - BLOB/TEXT column 'description' used in key specification without a key length CREATE TABLE `v2102_news` (
`id` int( 4 ) NOT NULL AUTO_INCREMENT ,
`title` varchar( 150 ) NOT NULL ,
`alias` varchar( 50 ) NOT NULL ,
`body` text NOT NULL ,
`date` date NOT NULL DEFAULT '0000-00-00',
`status` enum( 'approval', 'active' ) NOT NULL DEFAULT 'approval',
`lang` varchar( 25 ) NOT NULL ,
PRIMARY KEY ( id ) ,
KEY lang( lang ) ,
KEY title( title, body )
);

Messaggio di MySQL: Documentazione
#1170 - BLOB/TEXT column 'body' used in key specification without a key length
there're this other 2 errors :(
those errors are made trough esyndicat directory script database export tool (in admin section)

Michael Hill
05-02-2007, 11:12 AM
Hello!

Change
KEY url( url, description )
to
FULLTEXT KEY `url` (`url`,`description`)

Also change

KEY `title` ( title, body )

to

FULLTEXT KEY `title` ( title, body )

Ciao, Gracias!