Kohana框架:
$event_id = Arr::get($_GET, 'event_id');
$sql = 'SELECT CheckIn.BuildingID, CheckIn.buildingname, CheckIn.RoomID, CheckIn.RoomName, CheckIn.NumberofPeople, CheckIn.checkinTime, User.Firstname, User.Middlename, User.Lastname from CheckIn, User where CheckIn.eventID = :event_id and CheckIn.status != 0 and CheckIn.status != 1 and CheckIn.UserID = User.id';
$query = DB::query(Database::SELECT, $sql);
$query->param(':event_id', $event_id);
$results = $query->execute()->as_array();