Tabella:
Codice PHP:
CREATE TABLE `bans`(
`ban_email` text,
`ban_user` text,
`ban_ip` text
)TYPE=MyISAM DEFAULT CHARSET=utf8;
Estrapolazione
Codice PHP:
// Estrapola i dati di configurazione
$q = $database->query("SELECT * FROM `bans` WHERE `ban_ip` IS NOT NULL") or error('Unable to fetch forum config', __FILE__, __LINE__);
$ban = $database->fetch_array($q);
print_r($ban);
Risultato:
codice:
Array ( [ban_email] => [ban_user] => [ban_ip] => 123.94.26.* )
Mentre mi piacerebbe avere solo [ban_ip] => 123.94.26.*
Come fare?