PDA

View Full Version : SQL error on private.php


VBUsers
01-05-2006, 05:12 AM
everytime someone emptys theyre private box i get this error and they see an error page but it goes thru and does the command. can anyone help me with this error?


Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT pmid, pmtextid
FROM smora_pm AS pm
LEFT JOIN smora_pmtext AS pmtext USING (pmtextid)
WHERE folderid = 0
AND userid = 8423
AND dateline < 1136440049;

MySQL Error : Column: 'pmtextid' in field list is ambiguous
Error Number : 1052
Date : Wednesday, January 4th 2006 @ 11:47:33 PM
Script : http://www.lowandloud.com/private.php

harmor19
01-05-2006, 06:12 AM
If you haven't done any plugins or modification that affect that file then report it to Vbulletin.

If you do find a plugin or modification that does modify "private.php" undo the changes and see if you still get the error.

Logician
01-07-2006, 09:26 PM
you must be using a pluggin. That SQL is wrong. It should be:

SELECT pmid, pm.pmtextid
FROM smora_pm AS pm
LEFT JOIN smora_pmtext AS pmtext USING (pmtextid)
WHERE folderid = 0
AND userid = 8423
AND dateline < 1136440049;

VBUsers
01-08-2006, 06:48 AM
ok thanks but what would be the steps to fixing what you said was wrong?

harmor19
01-08-2006, 07:08 AM
Open "private.php"

Find
SELECT pmid, pmtextid

Replace With
SELECT pmid, pm.pmtextid

Logician
01-08-2006, 09:12 AM
unless you hacked private.php, it can't be the culprit. It should be a pluggin that plugs into private.php so you should check your pluggins to find which has this code.