Version: , by TECK
Developer Last Online: Nov 2023
Version: Unknown
Rating:
Released: 03-12-2002
Last Update: Never
Installs: 0
No support by the author.
let's suppose i have a board with users who can change their usertitle. as an admin i want to see what usergroup they are in, right under the usertitle.
this is what i tried: showthread.php
PHP Code:
$usergroups=$DB_site->query("SELECT title, usergroupid FROM usergroup");
while ($usergroup=mysql_fetch_object($usergroups)) {
if ($bbuserinfo['usergroupid']==6) {
$editgroup='[<a href="admin/usergroup.php?s=$session[sessionhash]&action=edit&usergroupid=$usergroup[usergroupid]">edit</a>]';
eval(...);
} else {
$editgroup='';
}
}
i dont know how to associate the user with the usergroup, in postbit.
thanks for your help.
avatardateline","")."
FROM post
".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
with:
Code:
avatardateline","").",usergroup.title AS usergrouptitle
FROM post
".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN usergroup ON (usergroup.usergroupid=user.usergroupid)
Database error in vBulletin 2.2.4:
Invalid SQL:
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath,
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter,usergroup.title AS usergrouptitle
,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline
FROM post
LEFT JOIN icon ON icon.iconid=post.iconid
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
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 IN (0,1,2)
ORDER BY dateline
mysql error: Cross dependency found in OUTER JOIN. Examine your ON conditions
mysql error number: 1120
Script: http://localhost/forum/forum/showthread.php?threadid=1
Referer: http://localhost/forum/forumdisplay.php?forumid=2
i will look into this and let you know where is the bug.. thanks for getting me started..
$usergroups=$DB_site->query("SELECT usergroup.usergroupid,usergroup.title
FROM usergroup
LEFT JOIN user ON user.usergroupid=usergroup.usergroupid");
while ($usergroup=$DB_site->fetch_array($usergroups)) {
echo "$usergroup[title]";
}
it does echo all the usergroups.. why it would not work on your code? it doesnt make sense.. and what's up with all this [high]Cross dependency found in OUTER JOIN[/high]?? i searched php.net and didnt find any relevant help. can you explain firefly? i want to learn this stuff.