anche oggi sono già esausto su cose che sembrano ridicole .
parliamo di un semplice confronto :
codice:
$cosae='BRONZO'; $testlvl=0;
$testlvl=ifsilver($userid);
if ($testlvl>0);
{
$cosae='ARGENTO';
}
$testlvl=ifgold($userid);
if ($testlvl>0);
{
$cosae='ORO';
}
echo "cosa ".$cosae." test :".$testlvl;exit();
come vedete stampo $cosae che è sempre = ORO mentre $testlvl = 0 ..
questa la funzione ifgold :
codice:
$ent = "SELECT ut_gold from utenti WHERE ut_id =".$cod; $rslt = $conn->query($ent);
if ( $rslt->rowCount() > 0 )
{
foreach ($rslt as $row):
if (is_null($row[0]))
{
return 0;
}
else
{
return $row[0];
}
endforeach;
}
ditemi qualcosa perchè impazzisco....
Ovviamente la funzione ifgold, come ifsilver, funzionano regolarmente e tornano o 0 e il codice trovato....