Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 02:12 am EST

Geeklog Forums

It quit working!


FreakWorld

Anonymous
I use this code on my site.
But I made a new site, and for some reason it's not working. I tryed making it by hand.
Copying my lib-custom over from the old site.
And even just pasting it in the lib-custom.
Is there a change in the new code of something that will stop this from working?
How do I get it to work now?
Text Formatted Code

function phpblock_ListUsers()
{
    global $_CONF;
    $list = "";
    $quer = mysql_query ("SELECT uid, username, photo, grp_id, grp_name, grp_descr FROM gl_groups, gl_group_assignments, gl_users WHERE ug_main_grp_id = grp_id AND gl_users.uid = gl_group_assignments.ug_uid AND grp_id = 38");
    while ($line = mysql_fetch_array($quer)){
    $list = $list.'<a href="'.$_CONF["site_url"].'/users.php?mode=profile&uid='.$line["uid"].'">'.$line["username"];
    if ($line["photo"] != ""){
    $list = $list.' </a><img src="'.$_CONF["layout_url"].'/images/smallcamera.gif">';
    }
    $list = $list.'<br>';
    }
return $list;
}

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
There's a hard-coded "grp_id = 38" in your code. Do you have a group on your new site that has a group id of 38?

bye, Dirk
 Quote

FreakWorld

Anonymous
yes
What I was doing was make a roster of a set group.
 Quote

FreakWorld

Anonymous
here is the error.
Text Formatted Code
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site35/fst/home/nsdf/system/lib-custom.php on line 267
 
 Quote

FreakWorld

Anonymous
any Ideas on this yet?
I realy need this to work.
Mr. Green
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Why don't you try that query in phpMyAdmin and see what you get?
 Quote

FreakWorld

Anonymous
I really don't know how.
But I did verify the ID with phpMyAdmin.
And the code works on my old site.
But I have not tried adding a new member to that group on my old site sense the last update.
 Quote

FreakWorld

Anonymous
I am so stuped.
I forgot I changed the gl to ns.
So in that code I changed every were the gl is to ns.
I am not geting an error.
But now it's not showing any one.
And not showing a box.
*Bangs head*
Why O why is this not showing the people in that group!!!!

Here is the changes.
Till me if I am doing yet something ealse stuped.


Text Formatted Code
function phpblock_cow()
{
    global $_CONF;
    $list = "";
    $quer = mysql_query ("SELECT uid, username, photo, grp_id, grp_name, grp_descr FROM ns_groups, ns_group_assignments, ns_users WHERE ug_main_grp_id = grp_id AND ns_users.uid = ns_group_assignments.ug_uid AND grp_id = 38");
    while ($line = mysql_fetch_array($quer)){
    $list = $list.'<a href="'.$_CONF["site_url"].'/users.php?mode=profile&uid='.$line["uid"].'">'.$line["username"];
    if ($line["photo"] != ""){
    $list = $list.' </a><img src="'.$_CONF["layout_url"].'/images/smallcamera.gif">';
    }
    $list = $list.'<br>';
    }
return $list;
}

 
 Quote

FreakWorld

Anonymous
hmmm it's working will kinda.
I have to go and re save there info.
Is there a way I can fix that?
 Quote

All times are EST. The time is now 02:12 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content