Rieccomi, ciao a tutti.
Avrei un problema che credo riguardi la sintassi.
Ho un pezzo di codice, che sia maledetto, che si ostina a non funzionare.
Gli errori che mi da sono:
Warning: mysql_query(): 2 is not a valid MySQL-Link resource in /home/mhd-01/www.********.com/htdocs/left2.php on line 59
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mhd-01/www.******.com/htdocs/left2.php on line 60
dove il codice è questo:
Codice PHP:
<?
$AA = "SELECT user, ee FROM INGRESSI ";
$BB = mysql_query($AA,$connessione);
while ($row = mysql_fetch_array($BB)) {
if ($row['ee'] == "0") {
$sexx = "SELECT SESSO FROM USERS WHERE USERNAME = '$row[user]'";
$query = mysql_query($sexx,$connessione) or die(mysql_error());
$fetch = mysql_fetch_array($query) or die(mysql_error());
if ($fetch == "Femmmina") {
$sex = "a";
} else {
$sex = "o";
}
echo "<font color='white'>".$row['user']." è entrat".$sex." ad Incubus</font>
";
} else {
echo "<font color='violet'>".$row['user']." è uscit".$sex." da Incubus</font>
";
}
}
?>
e la riga 59 e 60 sono rispettivamente la seconda e la terza.
non capisco che cosa mi voglia dire con quel 2 is not valid...
qualcuno mi può aiutare?