Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 10:09 am EST

Geeklog Forums

SQL Server error


SQL Error

Anonymous
Can anyone tell me why I would have an error for the table gl_pollquestions

The error is 1016: Can't open file: 'gl_pollquestions.MYI'. (errno: 145). SQL in question: SELECT COUNT(*) FROM gl_pollquestions

In PHPMyAdmin the sql is in use for that table?
 Quote

anonymous2

Anonymous
Can I just drop the table and create a new one? If I do, what would be the sql to upload, I know this is incorrect.

Text Formatted Code
CREATE  TABLE {$_TABLES[ 'pollquestions']}( qid varchar( 20  )  NOT  NULL default  '',
question varchar( 255  ) default NULL ,
voters mediumint( 8  ) unsigned default NULL ,
date datetime default NULL ,
display tinyint( 4  )  NOT  NULL default  '0',
commentcode tinyint( 4  )  NOT  NULL default  '0',
statuscode tinyint( 4  )  NOT  NULL default  '0',
group_id mediumint( 8  ) unsigned NOT  NULL default  '1',
owner_id mediumint( 8  ) unsigned NOT  NULL default  '1',
perm_owner tinyint( 1  ) unsigned NOT  NULL default  '3',
perm_group tinyint( 1  ) unsigned NOT  NULL default  '3',
perm_members tinyint( 1  ) unsigned NOT  NULL default  '2',
perm_anon tinyint( 1  ) unsigned NOT  NULL default  '2',
 INDEX pollquestions_qid( qid ) ,
 INDEX pollquestions_display( display ) ,
 INDEX pollquestions_commentcode( commentcode ) ,
 INDEX pollquestions_statuscode( statuscode ) ,
 PRIMARY  KEY ( qid )  ) TYPE  =  MYISAM
 
 Quote

not sure

Anonymous
Would this be correct for the sql statement?
Text Formatted Code
#
# Table structure for table `gl_pollquestions`
#

CREATE TABLE `gl_pollquestions` (
  `qid` varchar(20) NOT NULL default '',
  `question` varchar(255) default NULL,
  `voters` mediumint(8) unsigned default NULL,
  `date` datetime default NULL,
  `display` tinyint(4) NOT NULL default '0',
  `commentcode` tinyint(4) NOT NULL default '0',
  `statuscode` tinyint(4) NOT NULL default '0',
  `group_id` mediumint(8) unsigned NOT NULL default '1',
  `owner_id` mediumint(8) unsigned NOT NULL default '1',
  `perm_owner` tinyint(1) unsigned NOT NULL default '3',
  `perm_group` tinyint(1) unsigned NOT NULL default '3',
  `perm_members` tinyint(1) unsigned NOT NULL default '2',
  `perm_anon` tinyint(1) unsigned NOT NULL default '2',
  FULLTEXT KEY `qid` (`qid`),
  FULLTEXT KEY `question` (`question`)
) TYPE=MyISAM;
#
 


or should i change the bottom lines to:

Text Formatted Code
 INDEX `pollquestions_qid`( `qid` ) ,
 INDEX `pollquestions_display`( `display` ) ,
 INDEX `pollquestions_commentcode`( `commentcode` ) ,
 INDEX `pollquestions_statuscode`( `statuscode` ) ,
 PRIMARY  KEY ( qid )  ) TYPE  =  MYISAM
 


I am confused about the correct format to uplaod a sql statment manually.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Simply use the request from mysqltableanddata.php (the one you quoted in your second post above) and replace the

{$_TABLES[ 'pollquestions']}

with the actual table name, i.e. gl_pollquestions.

Btw, have you tried repairing the table?

And of course, doing regular backups can't hurt ...

bye, Dirk
 Quote

hanging in

Anonymous
Hey, thanks for the reply.
I did try repairing the table, but every time I accessed it in PHPMyadmin it would give the error mentioned in first post, stating it was in use.

I do perform regular backups, I have to do them through phpMyAdmin then upload the MySQLdump file to the backups directory as my server host wont allow access to the phpDump utility.....

BTW, That fixed the problem but now i have another I would like to post, Ill put in a new thread so it can be easily tracked., thanks again for your knowledge.
 Quote

All times are EST. The time is now 10:09 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