PDA

View Full Version : Upgrade From 3.6 gives SQL error


Ntfu2
08-11-2006, 02:08 AM
Anyone know which hack may cause this, i've disabled them via the config.php edit

Database error in vBulletin 3.6.0:

Invalid SQL:

SELECT COUNT(postid) AS count
FROM vb3_post AS post
LEFT JOIN vb3_deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > 1155260805
AND deletionlog.primaryid IS NULL;

MySQL Error : Column 'dateline' in where clause is ambiguous
Error Number : 1052
Date : Thursday, August 10th 2006 @ 11:04:07 PM
Script : http://www.xxxx.com/forums/
Referrer :
IP Address : xx
Username : xx
Classname : vB_Database

Kirk Y
08-11-2006, 02:10 AM
<a href="https://vborg.vbsupport.ru/showpost.php?p=1019223" target="_blank">https://vborg.vbsupport.ru/showpost.php?p=1019223</a>

Ntfu2
08-11-2006, 02:15 AM
Should i have done that before the upgrade?

doing it after the upgrade seems not to work?

Thanks for the help btw

Kirk Y
08-11-2006, 02:32 AM
Do you have the Staff Can Post Hidden Posts mod installed?

If so, try changing the global_start hook for this mod from:
$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");

To...

$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND post.dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");

Ntfu2
08-11-2006, 02:43 AM
That was it, I appreciate your quick help ;)

Kirk Y
08-11-2006, 03:06 AM
No problem.

wolfyman
08-12-2006, 05:24 PM
Hmm, same error here. I have the double post merge hack installed, but I changed the hook as shown in that post above. I'm still getting the error.

Any other hacks that might cause this error?

Paul M
08-12-2006, 06:29 PM
The fix above is not for the double post hack, so it's not likely to work.

Read the doublepost thread for the fix.