codice:
<?php
include("param.db.php");
$query="select * from $_GET[nome] order by id";
$result= mysql_query($query);
//$numfields = mysql_num_fields($result);
$numfields=mysql_num_fields(mysql_query($query));

?>
<table>
	<tr>
		<td width="152" valign="top">
		 [img]slide1.jpg[/img]</td>
	  <td width="903" height="126" align="center" valign="top">
		 <font face="Arial" size="7">ITIS &quot;B.Focaccia&quot;</font>


	  <font face="Arial" size="5"><? echo "$_GET[nome]" ?></font></td>
	</tr>	
	<tr align="center"></tr>
	<tr align="center">
    <td align="center">
	 <td>
	 </td>
	</td>	   	   
	</tr>
</table>

<?
echo "<table align=center border=1 width=100>\n<tr width=100>";
for ($i=0; $i < $numfields; $i++) 
  { 
   echo '<th width=100 >'.mysql_field_name($result, $i).'</th>'; 
   }
   echo "</tr>\n";
   
   while ($row = mysql_fetch_row($result)) 
  { 
   echo '<tr align=center width=100><td align=center width=100>'.implode($row,'</td><td>')."</td></tr>\n"; 
  }
echo "</table>\n";
  ?>
mi genera i seguenti errori:
1)Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in c:\...\www\pagella\vis.php on line 6
2)Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\...\www\pagella\vis.php on line 34

Che c'è di sbagliato?