PDA

View Full Version : Search button isn't working.


MagicPID
10-31-2012, 07:01 PM
I have no idea what happened, this error appeared out of no where.

Happens when you try to search, any ideas?

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT tagsearch.tagid, tag.tagtext, COUNT(*) AS searchcount
FROM tagsearch AS tagsearch
INNER JOIN tag AS tag ON (tagsearch.tagid = tag.tagid)
WHERE tagsearch.dateline > 1349117971
GROUP BY tagsearch.tagid, tag.tagtext
ORDER BY searchcount DESC
LIMIT 70;

MySQL Error : Incorrect key file for table 'tagsearch'; try to repair it
Error Number : 1034
Request Date : Wednesday, October 31st 2012 @ 10:59:31 PM
Error Date : Wednesday, October 31st 2012 @ 10:59:31 PM
Script : -----/forums/search.php
Referrer : -----
IP Address : -----
Username : -----
Classname : vB_Database
MySQL Version : 5.1.65-cll

Lynne
10-31-2012, 08:28 PM
And did you do as the error suggests and try to repair the table?

MagicPID
11-05-2012, 12:36 AM
And did you do as the error suggests and try to repair the table?

Yes, I did. It said the table is corrupt

Lynne
11-05-2012, 02:28 AM
3 ways to repair a database

===================
1. you need to upload tools.php from your vB zip file to your /admin directory and run this url

yourdomain.com/admin/tools.php

and click [Repair Tables]

2. or using mysqlcheck repair for 3.23.38 and above

i.e. in shell/telnet/ssh type while mysql is running and forum is CLOSED:

mysqlcheck -r -u mysqlusername -p databasename

3. or via myisamchk repair functions while mysql is shutdown/stopped in shell/telnet/ssh type :

myisamchk -r -u root -p databasename

option #3 most likely requires server and mysql root access to first stop mysql and then run myisamchk repair options.

If none of those work, you will need to contact your host for help.

MagicPID
11-10-2012, 03:31 AM
The table is showing as 0kb, is there a way I can re-upload just this table?

Better yet, can I just remove the tag feature from search so it isn't an issue? If it is what I think it is (most searched tags) it isn't really used much.

Lynne
11-10-2012, 03:54 PM
If you want, you may just delete the table and recreate it. The schema is in the /install/mysql-schema.php file.

MagicPID
11-10-2012, 09:11 PM
If you want, you may just delete the table and recreate it. The schema is in the /install/mysql-schema.php file.

I appreciate your help... I'm getting this error now

https://vborg.vbsupport.ru/external/2012/11/28.png

Lynne
11-10-2012, 11:31 PM
You don't run that file. Open it and you will find the query to create the table.

MagicPID
11-11-2012, 04:06 AM
You don't run that file. Open it and you will find the query to create the table.

Ugh, I'm still having issues.

When I try re-creating the table using the query in mysql-schema.php I just keep getting a query error.

Lynne
11-11-2012, 06:08 PM
And what is the exact query you are trying to run (please use the code tags)? And what is the exact error you are getting when running it? And do you have a table prefix defined in your config.php file?

MagicPID
11-11-2012, 08:44 PM
No, I don't have a prefix.


I wasn't sure exactly what exactly to run so I tried different variations and just parts of this, but none of them work. It always says syntax error.


$schema['CREATE']['query']['tagsearch'] = "
CREATE TABLE " . TABLE_PREFIX . "tagsearch (
tagid INT UNSIGNED NOT NULL DEFAULT '0',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
KEY (tagid)
)
";
$schema['CREATE']['explain']['tagsearch'] = sprintf($vbphrase['create_table'], TABLE_PREFIX . "tagsearch");



// IMPORTANT!!!! Update the template_temp table in adminfunctions_template.php whenever this table is altered
$schema['CREATE']['query']['template'] = "
CREATE TABLE " . TABLE_PREFIX . "template (
templateid INT UNSIGNED NOT NULL AUTO_INCREMENT,
styleid SMALLINT NOT NULL DEFAULT '0',
title VARCHAR(100) NOT NULL DEFAULT '',
template MEDIUMTEXT,
template_un MEDIUMTEXT,
templatetype ENUM('template','stylevar','css','replacement') NOT NULL DEFAULT 'template',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
username VARCHAR(100) NOT NULL DEFAULT '',
version VARCHAR(30) NOT NULL DEFAULT '',
product VARCHAR(25) NOT NULL DEFAULT '',
mergestatus ENUM('none', 'merged', 'conflicted') NOT NULL DEFAULT 'none',
PRIMARY KEY (templateid),
UNIQUE KEY title (title, styleid, templatetype),
KEY styleid (styleid)
)

Lynne
11-12-2012, 02:07 AM
You are putting that entire text into the query area? You need to only enter the actual query.

CREATE TABLE tagsearch (
tagid INT UNSIGNED NOT NULL DEFAULT '0',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
KEY (tagid)
)

MagicPID
11-12-2012, 08:47 PM
You are putting that entire text into the query area? You need to only enter the actual query.

CREATE TABLE tagsearch (
tagid INT UNSIGNED NOT NULL DEFAULT '0',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
KEY (tagid)
)

Thank you so much, I appreciate it.

Everything is working again.