PDA

View Full Version : Database error


darrenjdoc
05-14-2010, 12:57 PM
Hi

I am receiving this error and i am not sure how to fix it

Database error in vBulletin 4.0.2:

Invalid SQL:

SELECT *
FROM xt_style
WHERE (styleid = 21)
OR styleid = 21
ORDER BY styleid ASC
LIMIT 1;

MySQL Error : Unknown column 'styleid' in 'where clause'
Error Number : 1054
Request Date : Friday, May 14th 2010 @ 02:53:19 PM
Error Date : Friday, May 14th 2010 @ 02:53:19 PM
Script : http://www.rslocator.com/
Referrer :
IP Address : 93.97.246.187
Username : Doc
Classname : vB_Database_MySQLi
MySQL Version : 5.0.90-community-log

Anybody any idea ??

Thanks in advance

--------------- Added 1273845508 at 1273845508 ---------------

If i cant log onto the site how do i fix it ? Ftp ?

Lynne
05-14-2010, 01:34 PM
You can try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

I don't think that is going to do it though. There is no reason you should be missing that column in that table. Can you check that table and see what fields you have?

darrenjdoc
05-14-2010, 01:46 PM
Thanks for your help.

You are right it didnt help.

I had a database error on Wednesday and i had to reupload the database from the previous day and reupload the site and it cured it then. But this morning this started.

I am a bit of a noob. How do you check that table ?

borbole
05-14-2010, 01:57 PM
Thanks for your help.

You are right it didnt help.

I had a database error on Wednesday and i had to reupload the database from the previous day and reupload the site and it cured it then. But this morning this started.

I am a bit of a noob. How do you check that table ?


Go to phpmyadmin and run this query:

SHOW columns FROM style;

If your db tables have a prefix, include that in the query as well.

A table will be displayed with all the columns. Check it against the default structure for the style table and see what is missing and what not. Then readd manually the missing column and you should be all set.