public function databaseAction() { $database = new Search_Database(); DebugTools::print_r($database->get_doccount()); DebugTools::print_r($database->get_data(1)); DebugTools::print_r($database->get_termlist(1)); DebugTools::print_r($database->select()); }
public function DataAction() { $p = isset($_REQUEST['p']) ? intval($_REQUEST['p']) : 1; $database = new Search_Database(); $offset = 15; $count = $database->get_doccount(); $query = $database->select(($p - 1) * $offset + 1, $offset); $query = json_encode($query); echo $query; }