PDA

View Full Version : search error


viper007
01-04-2008, 01:08 AM
hi
when iam searching i got an error
that says data baceerror
and same erros came when iam click on the find all threads started by the member
wat t do
help me

snakes1100
01-04-2008, 01:22 AM
Post the complete mysql error.

viper007
01-04-2008, 02:13 AM
ok dude

--------------- Added 1199420120 at 1199420120 ---------------

this is the error message
Database error
The SportiveStudents-A New Way To Entertainment database has encountered a problem.

Please try the following:
Load the page again by clicking the Refresh button in your web browser.
Open the www.sportivestudents.com home page, then try to open another page.
Click the Back button to try another link.
The www.sportivestudents.com forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.
Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT post.pagetext AS preview,
thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid, thread.dateline, thread.forumid,
thread.replycount, IF(thread.views=0, thread.replycount+1, thread.views) as views, thread.sticky,
thread.pollid, thread.open, thread.lastpost AS postdateline, thread.visible, thread.hiddencount, thread.deletedcount,
thread.lastpost, thread.lastposter, thread.lastpostid, thread.attach, thread.postusername, thread.forumid,


deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,

user.userid AS postuserid
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed

, attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid , attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid
FROM thread AS thread
LEFT JOIN user AS user ON(user.userid = thread.postuserid)

LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')

LEFT JOIN subscribethread AS subscribethread
ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)

LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png')) LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png'))
WHERE thread.threadid IN
(703, 199, 213, 354) GROUP BY thread.threadid GROUP BY thread.threadid;

MySQL Error : Not unique table/alias: 'attachment'
Error Number : 1066
Date : Friday, January 4th 2008 @ 02:03:38 AM
Script : http://www.sportivestudents.com/search.php?searchid=234
Referrer : http://www.sportivestudents.com/index.php
IP Address : 60.21.206.10
Username : admin
Classname : vB_Database

Lynne
01-04-2008, 02:34 AM
You've got each of these statements in there twice:
, attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid
LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png'))

It looks like you modified the search.php page and added that statement, in which case if you upload the original php page, it should be fine. OR you installed a hack which is adding in that extra line in which case you need to disable that hack. I'm guessing it is the second problem and the plugin was added twice by mistake.