<?php require'../../shaxty.php'; $url = isset ($_REQUEST['url']) ? func::checkin($_REQUEST['url']) : false; $date = isset ($_REQUEST['date']) ? func::checkin($_REQUEST['date']) : false; // определяем день // Fetch the data $query = " SELECT hour, host, hit FROM top_count_hour WHERE url = '".$url."' and date = '".$date."' ORDER BY hour asc "; $result = core:: $db -> query( $query ); // Print out rows $data = array(); while ( $row = $result -> fetch() ) { $data[] = $row; } echo json_encode( $data ); ?>