vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   usergroup in memberlist (https://vborg.vbsupport.ru/showthread.php?t=33915)

squawell 01-15-2002 02:22 AM

i got the same error

Invalid SQL: SELECT *
FROM user,userfield
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
WHERE 8=8 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,30
mysql error: Column: 'usergroupid' in where clause is ambiguous

and i already replace the code with FireFly's post

any idea??

Admin 01-15-2002 12:18 PM

Quote:

Originally posted by squawell
and i already replace the code with FireFly's post
No, you didn't.

squawell 01-16-2002 03:57 AM

Quote:

Originally posted by FireFly

No, you didn't.

yes i'm sure!!

see my code
PHP Code:

$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
                          WHERE 
$condition AND
                                user.userid = userfield.userid
                                "
.iif($memberAllGood" AND user.usergroupid NOT IN (1,3,4) """)."
                          ORDER BY 
$orderby $direction
                          LIMIT "
.($limitlower-1).",$perpage"); 

it should be like this isn't it??

but it still cann't work~~

Admin 01-16-2002 02:21 PM

Then you didn't upload the file, because that query you pasted is not with the fix.

ElecEagle 03-13-2002 01:47 AM

Sorry to bother, but I have one quick question:

I have added this 'hack', but could someone please post what I would need to change in it to use the "user status" field for the group, rather than the group name? It's probably pretty easy ...I just don't know off hand what it would be. ...

sgeiger 09-03-2004 12:38 PM

Chen,

How could I change this query to only show members of a usergroup when one clicks on memberlist.

I want no outside groups to see the members of other user groups.

Group A to see only group A members in memberlist....
and
Group B to only see group B members in member list....




Quote:

Originally Posted by Chen
Err I'm in a bit of a hurry, but try replacing this in memberlist.php:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE $condition AND

with this:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
                          WHERE $condition AND

then try using $user[title] in the memberlistbit template.

Hope this works. :)



All times are GMT. The time now is 01:46 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.01164 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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