Ok grazie!!
Quindi non devo usare $result = mysql_query( "SELECT * FROM ec... questo codice non và bene giusto?

ecco come è impostato

while ($row = mysql_fetch_array ($result) and $i<=$num_rows) {
if(!ereg("p",$row[2])) {
if(!ereg("h",$row[2])) {
if(!ereg("s",$row[2])) {
if(!ereg("r",$row[2]))
{
$users = $row[2] + 1;
echo "<tr><td>".$users."</td>\n";
echo "<td><a href=\"join.php?r=".$row[0]."\">".utfiso($row[0])."</a></td>\n";