Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Sql problem...  (Read 2625 times)

0 Members and 1 Guest are viewing this topic.

Ricky

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Sql problem...
« on: November 28, 2004, 03:55:31 am »

Hi!

I made a backup of my coppermine database because i formatted my hd and when i try to reinstall the DB with phpmyadmin, i receive this error:


Code: [Select]
SQL-query:

CREATE TABLE `cpg132_pictures` (
`pid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`aid` int( 11 ) NOT NULL default '0',
`filepath` varchar( 255 ) NOT NULL default '',
`filename` varchar( 255 ) NOT NULL default '',
`filesize` int( 11 ) NOT NULL default '0',
`total_filesize` int( 11 ) NOT NULL default '0',
`pwidth` smallint( 6 ) NOT NULL default '0',
`pheight` smallint( 6 ) NOT NULL default '0',
`hits` int( 10 ) NOT NULL default '0',
`mtime` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
`ctime` int( 11 ) NOT NULL default '0',
`owner_id` int( 11 ) NOT NULL default '0',
`owner_name` varchar( 40 ) NOT NULL default '',
`pic_rating` int( 11 ) NOT NULL default '0',
`votes` int( 11 ) NOT NULL default '0',
`title` varchar( 255 ) NOT NULL default '',
`caption` text NOT NULL ,
`keywords` varchar( 255 ) NOT NULL default '',
`approved` enum( 'YES', 'NO' ) NOT NULL default 'NO',
`user1` varchar( 255 ) NOT NULL default '',
`user2` varchar( 255 ) NOT NULL default '',
`user3` varchar( 255 ) NOT NULL default '',
`user4` varchar( 255 ) NOT NULL default '',
`url_prefix` tinyint( 4 ) NOT NULL default '0',
`randpos` int( 11 ) NOT NULL default '0',
`pic_raw_ip` tinytext,
`pic_hdr_ip` tinytext,
PRIMARY KEY ( `pid` ) ,
KEY `owner_id` ( `owner_id` ) ,
KEY `pic_hits` ( `hits` ) ,
KEY `pic_rate` ( `pic_rating` ) ,
KEY `aid_approved` ( `aid` , `approved` ) ,
KEY `randpos` ( `randpos` ) ,
KEY `pic_aid` ( `aid` ) ,
FULLTEXT KEY `search` ( `title` , `caption` , `keywords` , `filename` )
) TYPE = MYISAM

MySQL said: Documentation
#1064 - You have an error in your SQL syntax near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `ctime` int(11) NOT NULL defaul' at line 11


Anyone know what's wrong? I'm running MySql 3.23 with PHP 4.3 ( I was running this version on the older system)


Thanks!
« Last Edit: November 28, 2004, 05:12:27 pm by TranzNDance »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Sql problem...
« Reply #1 on: November 28, 2004, 04:04:09 am »

Try replacing the line in question with this:

Code: [Select]
mtime timestamp(14) NOT NULL,
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Ricky

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Sql problem...
« Reply #2 on: November 28, 2004, 01:35:08 pm »

Thanks!!  it works :)
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.