PDA

View Full Version : check out this database error


michelle86
05-09-2011, 01:40 PM
Can anyone tell me how to fix this? It looks like it has to do with the albums.

If you can fix it, I pretty much will owe you my life. I've been getting these errors a lot.


Database error in vBulletin 4.1.2:

Invalid SQL:

SELECT alb.albumid, att.attachmentid, att.userid, att.caption, att.dateline, att.state, fdt.filesize, IF(fdt.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fdt.thumbnail_dateline, fdt.thumbnail_width, fdt.thumbnail_height, u.username
FROM album AS alb
LEFT JOIN attachment AS att ON alb.albumid = att.contentid
LEFT JOIN filedata AS fdt ON att.filedataid = fdt.filedataid
LEFT JOIN user AS u ON att.userid = u.userid
WHERE alb.state = 'public' AND att.contenttypeid = '8'
ORDER BY rand(430580)
LIMIT 6;

MySQL Error : Lost connection to MySQL server during query
Error Number : 2013
Request Date : Wednesday, May 4th 2011 @ 08:15:26 AM
Error Date : Wednesday, May 4th 2011 @ 08:17:10 AM
Script : http://members.lovingfromadistance.com/index.php
Referrer : http://members.lovingfromadistance.com/index.php
IP Address : 82.193.101.31
Username : Unregistered
Classname : vB_Database
MySQL Version :

Brandon Sheley
05-09-2011, 02:06 PM
MySQL Error : Lost connection to MySQL server during query

I'd ask your host..

kh99
05-09-2011, 02:59 PM
It looks like it's part of the "Widget: display random image thumbnail from public albums" mod, in case that helps (e.g. you could disable it until you figure it out).

Just a guess, but it could be that the query using "ORDER BY rand()" is too large if you have a lot of albums.

michelle86
05-09-2011, 05:06 PM
I've actually been thinking about switching hosts. Any good/reliable ones that are affordable? We're on bluehost right now. Been thinking about moving to a dedicated server the only thing I'm afraid of is losing stuff when the forum moves over. It seems like a daunting task.

Our members do have a lot of albums. Is there anything I can do about the query being too large? Open to ideas!