 (5, '410', '', '127.0.0.1', '1323141769', '-1'),
 (6, '503', '', '127.0.0.1', '1323141770', '-1');
 
--- --------------------------------------------------------
 
---
--- Stand-in structure for view `urlsbyid`
---
-DROP VIEW IF EXISTS `urlsbyid`;
-CREATE TABLE IF NOT EXISTS `urlsbyid` (
-`id` int(10) unsigned
-,`alias` varchar(50)
-,`url` text
-,`ip` varchar(128)
-,`time` varchar(15)
-,`status` varchar(2)
-,`visitors` bigint(21)
-);
--- --------------------------------------------------------
-
---
--- Stand-in structure for view `urlsbyvisits`
---
-DROP VIEW IF EXISTS `urlsbyvisits`;
-CREATE TABLE IF NOT EXISTS `urlsbyvisits` (
-`id` int(10) unsigned
-,`alias` varchar(50)
-,`url` text
-,`ip` varchar(128)
-,`time` varchar(15)
-,`status` varchar(2)
-,`visitors` bigint(21)
-);
--- --------------------------------------------------------
-
---
 -- Table structure for table `visits`
---
-
 DROP TABLE IF EXISTS `visits`;
 CREATE TABLE IF NOT EXISTS `visits` (
   `id` int(10) unsigned NOT NULL,


-- --------------------------------------------------------

--
-- Structure for view `recentvisits`
--
DROP TABLE IF EXISTS `recentvisits`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `recentvisits` AS select `urls`.`alias` AS `alias`,from_unixtime(`visits`.`time`) AS `FROM_UNIXTIME(visits.time)`,`visits`.`ip` AS `ip`,`visits`.`referrer` AS `referrer` from (`visits` join `urls` on((`urls`.`id` = `visits`.`id`))) order by `visits`.`time` desc limit 100;

-- --------------------------------------------------------

--
-- Structure for view `searchurlsvisits`
--
DROP TABLE IF EXISTS `searchurlsvisits`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `searchurlsvisits` AS select `urls`.`id` AS `id`,`urls`.`alias` AS `alias`,`urls`.`url` AS `url`,`urls`.`ip` AS `ip`,`urls`.`time` AS `time`,`urls`.`status` AS `status`,count(`visits`.`id`) AS `visits` from (`urls` join `visits` on((`visits`.`id` = `urls`.`id`))) group by `visits`.`id`;

-- --------------------------------------------------------

--
-- Structure for view `urlsbyid`
--
DROP TABLE IF EXISTS `urlsbyid`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `urlsbyid` AS select `urls`.`id` AS `id`,`urls`.`alias` AS `alias`,`urls`.`url` AS `url`,`urls`.`ip` AS `ip`,`urls`.`time` AS `time`,`urls`.`status` AS `status`,count(`visits`.`id`) AS `visitors` from (`urls` join `visits` on((`visits`.`id` = `urls`.`id`))) group by `visits`.`id` order by count(`visits`.`id`) desc;

-- --------------------------------------------------------

--
-- Structure for view `urlsbyvisits`
--
DROP TABLE IF EXISTS `urlsbyvisits`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `urlsbyvisits` AS select `urls`.`id` AS `id`,`urls`.`alias` AS `alias`,`urls`.`url` AS `url`,`urls`.`ip` AS `ip`,`urls`.`time` AS `time`,`urls`.`status` AS `status`,count(`visits`.`id`) AS `visitors` from (`urls` join `visits` on((`visits`.`id` = `urls`.`id`))) group by `visits`.`id` order by count(`visits`.`id`) desc;

  KEY `alias` (`alias`),
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

INSERT INTO `urls` (`id`, `alias`, `url`, `ip`, `time`, `status`) VALUES
(1, 'admin', '', '127.0.0.1', '1323141765', '-1'),
(2, '401', '', '127.0.0.1', '1323141766', '-1'),
