View Full Version : sql error on install
steve
10-26-2006, 05:37 AM
Error
SQL query:
CREATE TABLE `games` (
`gId` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`gInCategory` mediumint( 9 ) NOT NULL default '0',
`gName` text NOT NULL ,
`gThumb` varchar( 200 ) NOT NULL default '',
`gDescription` text NOT NULL ,
`gplays` mediumint( 45 ) NOT NULL default '0',
`location` text NOT NULL ,
UNIQUE KEY `gId` ( `gId` ) ,
UNIQUE KEY `gName` ( `gName` )
) TYPE = MYISAM AUTO_INCREMENT =1283
MySQL said: Documentation
#1170 - BLOB/TEXT column 'gName' used in key specification without a key length
bigarte
10-26-2006, 05:39 AM
This is the error I was referring to in my previous post on the Forum.
Also; under the Random Movies box is the following error message:-
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/bigarte/public_html/freemedia/templates/index_content.tpl on line 55
steve
10-26-2006, 05:41 AM
This is the error I was referring to in my previous post on the Forum.
Also; under the Random Movies box is the following error message:-
i have the same error on my page.
www.lowandloud.com
Let me try a test install.
One minute.
steve
10-26-2006, 05:49 AM
Let me try a test install.
One minute.
i made a database and tried to import and it wouldnt let me. so i manually ran the sqls and this one is the only one that wont go
--
-- Table structure for table `games`
--
CREATE TABLE `games` (
`gId` bigint(20) NOT NULL auto_increment,
`gInCategory` mediumint(9) NOT NULL default '0',
`gName` text NOT NULL,
`gThumb` varchar(200) NOT NULL default '',
`gDescription` text NOT NULL,
`gplays` mediumint(45) NOT NULL default '0',
`location` text NOT NULL,
UNIQUE KEY `gId` (`gId`),
UNIQUE KEY `gName` (`gName`)
) TYPE=MyISAM AUTO_INCREMENT=1283 ;
Run this Query:
CREATE TABLE `games` (
`gId` bigint(20) NOT NULL auto_increment,
`gInCategory` mediumint(9) NOT NULL default '0',
`gName` varchar(100) NOT NULL default '',
`gThumb` varchar(200) NOT NULL default '',
`gDescription` varchar(100) NOT NULL default '',
`gplays` mediumint(45) NOT NULL default '0',
`location` text NOT NULL,
UNIQUE KEY `gId` (`gId`),
UNIQUE KEY `gName` (`gName`)
) TYPE=MyISAM AUTO_INCREMENT=1283 ;
Let me know, that should work.
steve
10-26-2006, 06:12 AM
ok kipp were good to go. on to the next step now. thanks
Okay Great! Will be back in a few hours.
blank
10-26-2006, 01:09 PM
Steve, what version of MySQL are you running? The query that Kip gave you will actually limit the length of your descriptions. Quite a few of the descriptions are longer than that 100 characters.
Running this query on mine upgraded the varchar to text: ALTER TABLE `games` CHANGE `gDescription` `gDescription` VARCHAR( 500 ) NOT NULL
blank
10-26-2006, 01:29 PM
I'mve now changed the package to have this:
CREATE TABLE `games` (
`gId` bigint(20) NOT NULL auto_increment,
`gInCategory` mediumint(9) NOT NULL default '0',
`gName` varchar(100) NOT NULL default '',
`gThumb` varchar(200) NOT NULL default '',
`gDescription` text NOT NULL,
`gplays` mediumint(45) NOT NULL default '0',
`location` text NOT NULL,
UNIQUE KEY `gId` (`gId`),
UNIQUE KEY `gName` (`gName`)
) TYPE=MyISAM AUTO_INCREMENT=1283 ;
steve
10-26-2006, 02:09 PM
hey blank so do i drop the table or just run the first query you posted.
blank
10-26-2006, 03:07 PM
The first query I posted should just fix the problem for you. If not go ahead and drop it and try the second one that I posted.
I updated the free.zip package with the fixed .sql oddly it worked on my server ;)
steve
10-26-2006, 03:57 PM
Steve, what version of MySQL are you running? The query that Kip gave you will actually limit the length of your descriptions. Quite a few of the descriptions are longer than that 100 characters.
Running this query on mine upgraded the varchar to text: ALTER TABLE `games` CHANGE `gDescription` `gDescription` VARCHAR( 500 ) NOT NULL
worked like a charm thanks
bigarte
10-27-2006, 04:58 AM
Great friends. Thanks for the updated sql. Works great.
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.