Salve ho il seguente problema ho due tabelle una accesso e una stati.Voglio visualizzare il campo stato che è nella tabella stati che pero abbia come identificativo l'idutente della tabella accesso...quindi ho creato nella tabella stati un campo codice che ogni volta che inseriamo uno stato nella tabella stati mi inserisce anche l'idutente della tabella accesso nel campo codice(tabella stati).
$stato="SELECT stati.stato FROM stati INNER JOIN accesso ON accesso.idutente=stati.codice WHERE id='$id'";
$statoquery=mysql_query($stato);
$array=mysql_fetch_array($statoquery);
echo $array['stato'];
ma quando visualizzo a schermo $array['stato']; mi esce il seguente errore...
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Users\Renato\Desktop\Social\htdocs\network\cent er.php on line 22
cosa potrebbe essere?

Rispondi quotando