Ako sam dobro razumeo:
Code:
--
-- Table structure for table `files`
--
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`filename` varchar(100) NOT NULL,
`date_aded` datetime NOT NULL,
`file_hash` varchar(30) NOT NULL,
`size` int(11) NOT NULL,
`status` varchar(20) NOT NULL DEFAULT 'active',
`domain` int(11) NOT NULL DEFAULT '1',
`extension` varchar(5) NOT NULL,
`filesizeCustom` varchar(20) NOT NULL,
`unitFileSize` varchar(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2976 ;
--
-- Dumping data for table `files`
--
INSERT INTO `files` (`id`, `user_id`, `filename`, `date_aded`, `file_hash`, `size`, `status`, `domain`, `extension`, `filesizeCustom`, `unitFileSize`) VALUES
(26, 62, 'Numpad Tacka.desktop', '2013-08-06 07:23:12', '52008840bc3d0', 248, 'active', 7, '', '', ''),
(27, 62, 'winbox (2).exe', '2013-08-06 07:25:56', '520088e428217', 114176, 'deleted', 1, '', '', ''),
(28, 62, '268627_428878540495758_783570449_n.jpg', '2013-08-06 07:28:57', '52008999a8208', 103829, 'deleted', 8, '', '', '');
Code:
--
-- Table structure for table `downloads`
--
CREATE TABLE IF NOT EXISTS `downloads` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`file_id` int(11) NOT NULL,
`country` varchar(20) NOT NULL,
`revenue` decimal(10,2) NOT NULL,
`date` date NOT NULL,
`percentage` decimal(5,2) NOT NULL,
`timeDownload` int(30) NOT NULL,
`user_subid` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4060 ;
--
-- Dumping data for table `downloads`
--
INSERT INTO `downloads` (`id`, `file_id`, `country`, `revenue`, `date`, `percentage`, `timeDownload`, `user_subid`) VALUES
(3, 26, 'UNKNOWN', '0.22', '2014-05-16', '50.00', 1400225078, 'a5676f62a9e1cec63edf431f6d28f7'),
(4, 26, 'UNKNOWN', '1.05', '2014-05-16', '50.00', 1400224952, '65a11e9624e37fef9ff051a397e290'),
(5, 27, 'SERBIA', '1.00', '2014-05-16', '90.00', 1400224845, 'c40ba0219ecc14ec92d425bd11e2eb');
Code:
--
-- Table structure for table `clicks`
--
CREATE TABLE IF NOT EXISTS `clicks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`file_id` int(11) NOT NULL,
`country` varchar(20) NOT NULL,
`date` date NOT NULL,
`timeClick` int(30) NOT NULL,
`user_subid` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=244980 ;
--
-- Dumping data for table `clicks`
--
INSERT INTO `clicks` (`id`, `file_id`, `country`, `date`, `timeClick`, `user_subid`) VALUES
(32, 26, 'Serbia', '2014-05-16', 1400225078, 'a5676f62a9e1cec63edf431f6d28f7'),
(33, 26, 'Serbia', '2014-05-16', 1400224952, '65a11e9624e37fef9ff051a397e290'),
(34, 27, 'Serbia', '2014-05-16', 1400224845, 'c40ba0219ecc14ec92d425bd11e2eb');
Ovako? :) Izvinite, ali nemam bas mnogo iskustva sa razjasnjavanjem problema o MySQL upitima.
Daniel Dulic