Ciao a tutti,
navigando nel sito che sto sviluppando, in una pagina mi da questi 2 errori:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test_sito_argonauti_2\appuntamenti\archivio.php on line 17
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test_sito_argonauti_2\appuntamenti\archivio.php on line 32
lo script è questo:
archivio.php
	
	
	
		
				
			navigando nel sito che sto sviluppando, in una pagina mi da questi 2 errori:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test_sito_argonauti_2\appuntamenti\archivio.php on line 17
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test_sito_argonauti_2\appuntamenti\archivio.php on line 32
lo script è questo:
archivio.php
		PHP:
	
	<h2>Archivio Appuntamenti</h2>
<br/>
<br/>
<?php
//dichiaro le variabili per poter gestire le date nella query
	$anno_attuale = date("Y");
	$data_odierna = date("Y-m-d");
	
//query di estrazione dalla banca dati	
	$selAppuntamento = "SELECT id_appuntamento, date_format(data_appuntamento, '%d.%m.%Y'), testo_appuntamento, id_testo FROM appuntamento YEAR(data_appuntamento)<$anno_attuale ORDER BY data_appuntamento DESC";
	$result = mysql_query($selAppuntamento, $db);
	
	echo
		"<table border=\"1\">\n";
     //ciclo che mi permette di controllare le righe restituite dalla query           
        while ($line = mysql_fetch_array($result, MYSQL_NUM))
        	{      
            echo "<tr>";	
				//echo "<td>".$line[0]."</td>";
				echo "<td>".$line[1]."</td>";
				//echo "<br/>";
				echo "<td>".$line[2]."</td>";
				//echo "<td>".$line[3]."</td>";
					
				
				echo "\t\t<td><a href='?indice=31&id_appuntamento=$line[0]&id_testo=$line[3]'>Link</td>\n";
			echo "\t</tr>\n";
			}
	echo "</table>\n";
	                
	mysql_free_result($result);
	mysql_close($db);
	
?>