PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : User CP -> DB Erro


Disi
28.10.2005, 23:01
Huhu, ich weiß nicht was ich falsch gemacht habe aber irgendwie krieg ich diesen fehler:


Datenbankfehler in vBulletin 3.5.0:

Invalid SQL:

SELECT thread.threadid, thread.forumid,
IF(threadread.readtime IS NULL, 1129668783, IF(threadread.readtime < 1129668783, 1129668783, threadread.readtime)) AS threadread,
IF(forumread.readtime IS NULL, 1129668783, IF(forumread.readtime < 1129668783, 1129668783, forumread.readtime)) AS forumread,
thread.lastpost, subscribethread.subscribethreadid
FROM vb_thread AS thread,
vb_subscribethread AS subscribethread
LEFT JOIN vb_threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = 3)
LEFT JOIN vb_forumread AS forumread ON (forumread.forumid = thread.forumid AND forumread.userid = 3)
WHERE subscribethread.threadid = thread.threadid
AND subscribethread.userid = 3
AND thread.visible = 1
HAVING thread.lastpost > IF(threadread > forumread, threadread, forumread);

MySQL-Fehler : Unknown column 'thread.threadid' in 'on clause'
Fehler-Nr. : 1054
Datum : Friday, October 28th 2005 @ 10:53:03 PM
Skript : http://www.bytetales.info/forums/usercp.php
Referrer : http://www.bytetales.info/forums/index.php
IP-Adresse : 80.137.7.189
Benutzername : Disi
Klassenname : vB_Database


Hoffe ihr könnt mir da helfen.

Mystics
29.10.2005, 00:50
Das ist ein Fehler im Zusammenhang mit MySQL 5.0.x und wird in der nächsten Version von vBulletin behoben sein.

Bis dahin musst du die usercp.php selbst bearbeiten.

Suche (Zeile 282): $getthreads = $db->query_read("
SELECT thread.threadid, thread.forumid,
IF(threadread.readtime IS NULL, $readtimeout, IF(threadread.readtime < $readtimeout, $readtimeout, threadread.readtime)) AS threadread,
IF(forumread.readtime IS NULL, $readtimeout, IF(forumread.readtime < $readtimeout, $readtimeout, forumread.readtime)) AS forumread,
thread.lastpost, subscribethread.subscribethreadid
FROM " . TABLE_PREFIX . "thread AS thread,
" . TABLE_PREFIX . "subscribethread AS subscribethread
LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ")
LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = thread.forumid AND forumread.userid = " . $vbulletin->userinfo['userid'] . ")
WHERE subscribethread.threadid = thread.threadid
AND subscribethread.userid = " . $vbulletin->userinfo['userid'] . "
AND thread.visible = 1
HAVING thread.lastpost > IF(threadread > forumread, threadread, forumread)
");Ersetze es mit: $getthreads = $db->query_read("
SELECT thread.threadid, thread.forumid,
IF(threadread.readtime IS NULL, $readtimeout, IF(threadread.readtime < $readtimeout, $readtimeout, threadread.readtime)) AS threadread,
IF(forumread.readtime IS NULL, $readtimeout, IF(forumread.readtime < $readtimeout, $readtimeout, forumread.readtime)) AS forumread,
thread.lastpost, subscribethread.subscribethreadid
FROM " . TABLE_PREFIX . "subscribethread AS subscribethread
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (subscribethread.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ")
LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = thread.forumid AND forumread.userid = " . $vbulletin->userinfo['userid'] . ")
WHERE subscribethread.userid = " . $vbulletin->userinfo['userid'] . "
AND thread.visible = 1
HAVING thread.lastpost > IF(threadread > forumread, threadread, forumread)
");

Disi
29.10.2005, 02:22
Huhu,

super danke!

Gibts noch mehr bekannte Probleme mit MySQL5?