Codice PHP:
<?
$c = 1;
if ($c == 1 || $c == 'm')
{
$f = 'MyGuests';
}
else
{
$f = 'Controllo';
}
$g = "SELECT * FROM $f WHERE id=(SELECT MAX(id) FROM $f)";
$h = mysqli_connect('', '', '', 'my_fanonymous');
$i = mysqli_query($h, $g);
if (!is_numeric(mysqli_fetch_array($i)[0]))
{
echo '0';
}
else
{
echo mysqli_fetch_array($i)[0];
}
var_dump(mysqli_fetch_array($i));
mysqli_close($h);