Jump to content

Mysql Errors? Help!


Shiny_Charizard

Recommended Posts

<?php
include('top.php'); 

$username = $_SESSION["username"];

if(empty($username))
{
echo "<TD class='table'>
<center>
<TABLE  RULES='rows' WIDTH='580px'>
<center><B>An Error has occured</B></center>
<BR>
<BR>
You must be logged in to view this page.<br /><br /><a href='login.php'>Login</a>.
</TABLE>
<BR>
<BR>
</TD></center>";
}
else
{
echo "<TD class='table'>
<center>
<TABLE RULES='rows' WIDTH='580px'>
<center><B>Staff List</B></center>
<BR>
<BR>
<TR>
<TD CLASS='theadings'><CENTER><B>ID</B></CENTER></TD>
<TD CLASS='theadings'><CENTER><B>Username</B></CENTER></TD>
<TD CLASS='theadings'><CENTER><B>Position</B></CENTER></TD>
</TR>";
$WebMasters2 = mysql_query("SELECT * FROM members WHERE trainer_position='<span style='color:blue;font-weight:bold;border:dotted 1px;'>Webmaster</span>'");
while($WebMasters = mysql_fetch_array($WebMasters2))
{
echo "<TR>
<TD CLASS='headings'><center>$WebMasters[user_id]</center></TD><TD CLASS='headings'><center><a href='profile.php?ID=$WebMasters[user_id]'>$WebMasters[username]</a></center></TD><TD CLASS='headings'><center>$WebMasters[trainer_position]</center></TD>
</TR>";
}
$Administrator2 = mysql_query("SELECT * FROM members WHERE trainer_position='<font color='red'>Administrator</font>'");
while($Administrator = mysql_fetch_array($Administrator2))
{
echo "<TR>
<TD CLASS='headings'><center>$Administrator[user_id]</center></TD><TD CLASS='headings'><center><a href='profile.php?ID=$Administrator[user_id]'>$Administrator[username]</a></center></TD><TD CLASS='headings'><center>$Administrator[trainer_position]</center></TD>
</TR>";
}
$SuperMod2 = mysql_query("SELECT * FROM members WHERE trainer_position='<font color='darkorange'>Super Moderator</font>'");
while($SuperMod = mysql_fetch_array($SuperMod2))
{
echo "<TR>
<TD CLASS='headings'><center>$SuperMod[user_id]</center></TD><TD CLASS='headings'><center><a href='profile.php?ID=$SuperMod[user_id]'>$SuperMod[username]</a></center></TD><TD CLASS='headings'><center>$SuperMod[trainer_position]</center></TD>
</TR>";
}
$BetaTester2 = mysql_query("SELECT * FROM members WHERE trainer_position='<span style='color:green'>Beta Tester</span>'");
while($BetaTester = mysql_fetch_array($BetaTester2))
{
echo "<TR>
<TD CLASS='headings'><center>$BetaTester[user_id]</center></TD><TD CLASS='headings'><center><a href='profile.php?ID=$BetaTester[user_id]'>$BetaTester[username]</a></center></TD><TD CLASS='headings'><center>$BetaTester[trainer_position]</center></TD>
</TR>";
}
echo "</TABLE>
<BR>
<center><small><i><font color='red'>Note:</font> Only members on this list are staff members. 
<br />
So if someone claims to be a staff member and they are not on this list they are not staff.
<br />
We may accept gifted programmers for WebMaster.
</i></small></center>
<BR>
</TD>
</center>";
}

include('bottom.php');
?>

Why do I keep getting these MySQL errors:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/tpfrpg/stafflist.php on line 34

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/tpfrpg/stafflist.php on line 41

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/tpfrpg/stafflist.php on line 48

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/tpfrpg/stafflist.php on line 55

I checked the code over and over again but I couldn't find the problem

Please some one help me.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.