"CREATE TABLE IF NOT EXISTS visits
(
id int auto_increment not null,
searchengine char(48) NOT NULL,
useragent char(32) NOT NULL,
ip char(32) NOT NULL,
date date NOT NULL,
primary key (id)
)");
####
(undef, undef, undef, $Day, $Month, $Year, undef, undef, undef) = localtime(time);
$Month++;
$Year += 1900;
$MySQLDate = "${Year}-${Month}-${Day}";
####
select searchengine, date, count(*) from visits group by searchengine, date order by date desc
####
select searchengine, date, count(*) from visits where date = '2004-01-31' group by searchengine, date order by date desc
####
select searchengine, count(*) from visits group by searchengine