vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Profile Enhancements - Unique Avatars (https://vborg.vbsupport.ru/showthread.php?t=148711)

mfyvie 06-06-2007 07:23 AM

JordanT - your issue is not the same as Andy's - the error message is totally different.

It looks like you are the first guy to use table prefixes, and I see a small mistake in the query, I'll work on a fix soon, but am still looking at Andy's issue. I'll update this thread with more info soon.

ABMAC 06-06-2007 08:03 AM

I'm also having trouble getting this mod to work. I would appreciate any help you can offer.

PHP version 4.4.7
MySQL version 4.0.23

Code:

Database error in vBulletin 3.6.7:

Invalid SQL:

            SELECT avatar.avatarid, avatar.title, avatar.minimumposts, avatar.avatarpath, avatar.imagecategoryid, avatar.displayorder, count(1)
            FROM user , avatar
            WHERE user.avatarid = avatar.avatarid
            AND avatar.imagecategoryid = 3
            AND minimumposts <= 8681
            GROUP by avatar.avatarid
            UNION
            SELECT avatarid, title, minimumposts, avatarpath, imagecategoryid, displayorder, 0
            FROM avatar
            WHERE avatarid not in (select distinct avatarid from user)
            AND imagecategoryid = 3
            AND minimumposts <= 8681
            ORDER by displayorder, title
            LIMIT 50,10;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select distinct avatarid from user)
            AND imagecateg
Error Number : 1064
Date        : Tuesday, June 5th 2007 @ 04:04:37 PM
Script      : http://megomuseum.com/community/profile.php?do=editavatar&categoryid=3&page=6
Referrer    : http://megomuseum.com/community/profile.php?do=editavatar&categoryid=3&page=5
IP Address  : ***.***.***.***
Username    : ABMAC
Classname    : vb_database


mfyvie 06-06-2007 08:17 AM

Ok, so far we've had two people with error 1064 - reporting a syntax error. This is very strange, since the syntax seems to be correct. Please run a repair / optimise on your database to see if it corrects the issue. To be honest this is a stab in the dark, but I can't think what else would cause this.

The report of error 1146 is a bug which affects people with table prefixes. I've made some changes, but waiting for the guy who reported it to get back to me so I can get him to test it.

ABMAC - please report back after running a repair/optimise

mfyvie 06-06-2007 09:12 AM

ABMAC - apparently subqueries (which this one is using) are only available in mysql 4.1 and up. You are running 4.0 - would you consider upgrading? Andy is running 4.1 and having the same issue, but the cause may be different.

mfyvie 06-06-2007 09:23 AM

Ok, I've updated the XML file - it was not handling situations where people are using table prefixes. This will resolve JordanT's issue, but not the issue seen by ABMAC or Andy.

Andyucs 06-06-2007 09:35 AM

just like to say thanks for your work trying to resole this matter

Andyucs 06-06-2007 10:09 AM

ok installed on another site and get the same

as soon as i enable Force unique avatars? to yes i get the error

runs fine as in the screen shot

ABMAC 06-06-2007 03:20 PM

Thanks, mfyvie, I'll see about getting MySQL 4.1 installed. Should I still run repair/optimise on my database? My board is fairly new and shouldn't have any problems yet.

mfyvie 06-06-2007 03:29 PM

You don't have to, but it probably wouldn't hurt. I wasn't able to figure out Andy's issue, but he has no control over his mysql settings so we were limited in what we could do. Your issue should be fixed by an upgrade though.

I'm going to look at re-writing the query so that people with < mysql 4.1 can also use this mod, but it's not simple.

JordanT 06-06-2007 08:17 PM

Thanks for fixing my problem. Much appreciated!


All times are GMT. The time now is 05:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01369 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete