View Full Version : Database error
baby41
03-25-2008, 08:57 PM
Yesterday I got this error when I try to send a Pm:
Database error in vBulletin 3.6.8:
Invalid SQL:
SELECT COUNT(*) AS total, folderid
FROM pm AS pm
LEFT JOIN pmtext AS pmtext USING(pmtextid)
WHERE userid = 556
GROUP BY folderid;
MySQL Error : Unknown column 'pmtextid' in 'from clause'
Error Number : 1054
Date : Tuesday, March 25th 2008 @ 03:49:28 PM
Script : hxxp://www.xxxxxxxxx.com/forum/private.php?do=newpm&u=2
Referrer : hxxp://www.xxxxxxxxx.com/forum/member.php?u=2
IP Address : 91.xx.xx.xxx
Username : xxxxxxxxx
Classname : vb_database
And to make it worse I had a virus at my PC last week and lost all my files including a backup of my database :mad:, what can I do :confused:
Jase2
03-25-2008, 09:20 PM
To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':
Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions
[Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]
Next, disable all plugins.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php
define('DISABLE_HOOKS', true);
Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
Regards Jason :)
baby41
03-25-2008, 09:59 PM
Thanks for your prompt reply,I have done all of the above and still have the same error when I try to send a PM.:confused::confused:
Jase2
03-25-2008, 10:06 PM
I think your PM table may have crashed. To fix it, run Repair/Optimize in the Admin CP. You may need to run it more than once to fix all errors:
Admin CP -> Import & Maintenance -> Repair/Optimize Tables -> Check All -> Continue
Regards Jason :)
snakes1100
03-25-2008, 10:09 PM
It didnt crash, read the error msg.
MySQL Error : Unknown column 'pmtextid' in 'from clause'
Did you just install or un-install a hack before this started?
baby41
03-25-2008, 10:17 PM
It didnt crash, read the error msg.
MySQL Error : Unknown column 'pmtextid' in 'from clause'
Did you just install or un-install a hack before this started?
No I didn?t install or n-install any hack but when talking with another Admin he told that was using the forum database for a test to a youtube clone installed in our server,do yo think it might be that,and what to do now.......:mad:
snakes1100
03-25-2008, 10:21 PM
Hard to say, did you even check the db to see if the column is even there?
Marco van Herwaarden
03-26-2008, 12:26 PM
Please use a tool like phpMyAdmin to see if the 'pm' & 'pmtext' tables exist and which columns they contain. Please post the results here.
Lynne
03-26-2008, 02:50 PM
And maybe suggest to the admin that he create a test board for testing things instead of using the live database. :)
baby41
03-26-2008, 08:15 PM
Please use a tool like phpMyAdmin to see if the 'pm' & 'pmtext' tables exist and which columns they contain. Please post the results here.
Pm has this:
pm_id
subject
body
sender
receiver
date
seen
inbox_track
outbox_track
Pmtext has this:
pmtextid
fromuserid
fromusername
title
message
touserarray
iconid
dateline
showsignature
allowsmilie
snakes1100
03-26-2008, 08:54 PM
Make sure all the files from any hacks that arent being used are removed, this includes the xml files if any that are in the includes/xml folder for hacks that arent being used too.
Lynne
03-26-2008, 09:05 PM
Something has happened to your PM table. These are the columns in my pm table (3.6.8):
pmid
pmtextid
userid
folderid
messageread
Could your admin have overwritten the table when he tried to do this other installation?
Marco van Herwaarden
03-27-2008, 10:26 AM
As already mentioned, this does not look like the vBulletin PM at all. Most likely this table (and more??) have been overwritten by another application.
Most secure solution would be to restore the entire database to a point before installing this other application.
Marco van Herwaarden
03-27-2008, 10:27 AM
Make sure all the files from any hacks that arent being used are removed, this includes the xml files if any that are in the includes/xml folder for hacks that arent being used too.
Just wondering how you came to this advice based on the information posted?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.