vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Meet Our Staff (https://vborg.vbsupport.ru/showthread.php?t=184491)

sgrisole 03-14-2009 03:01 PM

I installed version 3.2 and now I get the following error when visiting staff.php

Code:

Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT usergroup.usergroupid, usergroup.title, usergroup.isstaff
COUNT(user.userid) AS membercount
FROM usergroup AS usergroup
LEFT JOIN user AS user ON (user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
WHERE usergroup.isstaff = '1'
GROUP BY usergroup.usergroupid
ORDER BY usergroup.title ASC;

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 'COUNT(user.userid) AS membercount
FROM usergroup AS usergroup
LEFT JOIN user A' at line 2
Error Number  : 1064
Request Date  : Saturday, March 14th 2009 @ 11:43:48 AM
Error Date    : Saturday, March 14th 2009 @ 11:43:48 AM
Classname    : vB_Database
MySQL Version : 5.0.67-community

I tried to uninstall / reinstall the product several times but it didn't fix the problem...
BTW is the PRO version available somewhere?

tidefans 03-14-2009 06:13 PM

I am getting this same error


Quote:

Originally Posted by sgrisole (Post 1767919)
I installed version 3.2 and now I get the following error when visiting staff.php

Code:

Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT usergroup.usergroupid, usergroup.title, usergroup.isstaff
COUNT(user.userid) AS membercount
FROM usergroup AS usergroup
LEFT JOIN user AS user ON (user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
WHERE usergroup.isstaff = '1'
GROUP BY usergroup.usergroupid
ORDER BY usergroup.title ASC;

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 'COUNT(user.userid) AS membercount
FROM usergroup AS usergroup
LEFT JOIN user A' at line 2
Error Number  : 1064
Request Date  : Saturday, March 14th 2009 @ 11:43:48 AM
Error Date    : Saturday, March 14th 2009 @ 11:43:48 AM
Classname    : vB_Database
MySQL Version : 5.0.67-community

I tried to uninstall / reinstall the product several times but it didn't fix the problem...
BTW is the PRO version available somewhere?


cookiepants 03-14-2009 07:48 PM

Database error here too. I'd like to try it before paying for one. I've tried all versions here and will remove until the DB issue is resolved. Thanks!

Lynne 03-14-2009 08:10 PM

It looks like it's just missing a comma before the COUNT part of the select statement. Did someone try just addig in the comma and seeing if the error goes away?

sgrisole 03-14-2009 09:46 PM

Thanks Lynne, that made the page work, but now for some reason the moderators aren't listed when I click on the "moderators" link in staff.php. Only the admins are shown. Yes, I already added the "moderators" group to the staff usergroups in the options.
Any idea?

edit: I found out what was causing the problem and fixed it: the "moderators" group was not set as the primary group for moderators, so they didn't show up in the staff.php page. Now I have one more thing to adjust... Is there any way to have both the admins and moderators displayed on the same page? There are only two admins and 3 moderators in my board, so it would be nice to have them displayed on the same page.

Switch02 03-15-2009 12:13 PM

This version work on vb 3.8.1?

Thanks

sheppardzwc 03-15-2009 01:20 PM

Quote:

Originally Posted by Switch02 (Post 1768618)
This version work on vb 3.8.1?

Thanks

I don't know if it does or not, currently fixing an SQL error that Lynne supplied the answer to, and will post back later.

EDIT: Working perfectly for me.

http://www.toontownhall.com/forums/showgroups.php

Just remember to add a comma after the usergroup.istaff comment in the SQL query. (in staff.php by default)

Quote:

SELECT usergroup.usergroupid, usergroup.title, usergroup.isstaff,
COUNT(user.userid) AS membercount

cynthetiq 03-15-2009 05:15 PM

I did the update from 2.0 to 3.2 with the , for the SQL query. I get nothing on the staff.php page, not even a single name. if I use the 3.1 staff.php, I get names, broken up groups, but no title for the group, and no avatars for the individuals.

cynthetiq 03-15-2009 06:47 PM

some of it is my fault. I didn't declare the groups....

now that I di dthat. here's a screen cap

https://vborg.vbsupport.ru/external/2009/03/17.png

KSMatic 03-16-2009 04:21 AM

here is the staff.php file that needed to be fixed with "," for those who are getting database issues.

Copy this in to your forums/ directory file and bam, it works :)


All times are GMT. The time now is 01:01 PM.

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.02305 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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