PDA

View Full Version : Sudden Mysql error


NuclioN
11-09-2002, 11:39 PM
The following error was showing up out of the blue:

Invalid SQL:

SELECT

post.*,SUM(bookmarks.public) AS bmcount,SUM(bookmarks.counter) AS allhits,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath,

attachment.attachmentid,attachment.filename,attach ment.visible AS attachmentvisible,attachment.counter

,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline

FROM post

LEFT JOIN icon ON icon.iconid=post.iconid

LEFT JOIN user ON user.userid=post.userid

LEFT JOIN userfield ON userfield.userid=user.userid

LEFT JOIN avatar ON avatar.avatarid=user.avatarid

LEFT JOIN customavatar ON customavatar.userid=user.userid

LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid

WHERE post.postid = '57103'


mysql error: Unknown table 'bookmarks' in field list

mysql error number: 1109



Maybe there is a line of code or a table removed while hacking the files. I don't know how long this error was present until it showed up so i can't figure out wich hack was the start of this problem. :(

This error shows up when a member is set on ignore when you click on "HERE" to read the post from an ignored member.

Xenon
11-09-2002, 11:53 PM
Well it seems you have to join a bookmarks table in the query or take out this: "SUM(bookmarks.public) AS bmcount,SUM(bookmarks.counter) AS allhits,"

NuclioN
11-10-2002, 12:11 AM
You mean take out with this: // ? or remove that part of code?

Xenon
11-10-2002, 12:15 AM
remove it ;)

NuclioN
11-10-2002, 12:58 AM
Well...it gives a parse error, this line of code belongs to the bookmark hack. Maybe i must uninstall it?

Xenon
11-10-2002, 02:12 PM
wouldn't be bad ;)

uninstall it, and if you need it really, then reinstall it correctly.

be sure you made all DB-changes

QiQme
11-18-2003, 01:54 PM
search in showthread.php for:

WHERE post.postid = '$postid'

and replace with:

".iif ($bmpublicbrowse!="0","LEFT JOIN bookmarks ON bookmarks.userid=user.userid AND bookmarks.public='1'","")."
WHERE post.postid = '$postid'
GROUP BY post.postid

Xenon
11-18-2003, 04:39 PM
i don't think he needs the answer after one year...