18
I'm back to trying to get this worked out and making a little progress. I would like to do two things.
1) Use the database object as Mithrandir suggested.
2) Display a list of 10 members at a time.
Currently, only one member shows no matter what number I use in the limit (though I don't actually know what that's for). And all my attempts to use the database object have failed.
I am also excluding 2 user IDs. As you can see, I know very little PHP so please be gentle.
Here is what I've got in a custom block so far:
$random_member = mysql_fetch_assoc(mysql_query("SELECT uid, uname FROM mydbname_users WHERE level>0 AND uid>1 ORDER BY RAND() LIMIT 1"));
if $random_member[uid] == '4' || $random_member[uid] == '215')
echo "";
else {
echo "
";
echo "$random_member[uid]'>$random_member[uname]
";}
Would someone please help me correct this?
TIA,
C
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]