%PDF- %PDF-
Direktori : /home/nailstv/public_html/ |
Current File : /home/nailstv/public_html/_cron_stat.php |
<?php $start = microtime(true); require_once 'config/config.php'; error_reporting(E_ALL); $db = Db::getInstance(); Registry::set('db', $db); $sql = "SELECT v.id, COUNT(vn.id) as nezettseg, vtvszf.szazalek as ertekeles FROM video v " . $db->joinDefPic( 'video', 'v' ) . " LEFT JOIN kategoria ka ON ka.id = v.kategoria_id LEFT JOIN vt_video_szavazas_full vtvszf ON vtvszf.video_id = v.id LEFT JOIN video_nezettseg vn ON vn.video_id = v.id WHERE v.storno = 'f' AND v.aktiv = 't' AND ka.storno = 'f' GROUP BY v.id ORDER BY v.id DESC"; $res = $db->GetArray($sql); echo 'Generated: ' .($start-microtime()).' s'; echo '<pre>'; print_r( $res ); die();