PHP
14
Вклад в тег
CREATE TABLE IF NOT EXISTS `votes_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SELECT COUNT(*) FROM `votes_log` WHERE date > DATE_SUB(NOW(), INTERVAL 3 DAY) AND user_id=?
$result = json_encode($result);
$mpdf = new mPDF;
$mpdf->setBasePath("http://example.com");
$mpdf->WriteHTML($html);
$pdf = $mpdf->Output('', 'S');