//$result = $gate->findById(3); //echo $result->id . " - " . $result->ip_address; // //echo '<h3>Test filterByBrowser(2)</h3>'; //$gate = new VisitsTableGateway($dbAdapter); //$result = $gate->filterByBrowser(2); //foreach ($result as $row) { // echo $row->id . " - " . $row->browser_id .' - '. $row->ip_address . "<br/>"; //} //echo '<h3>Test filterByOS(4)</h3>'; //$gate = new VisitsTableGateway($dbAdapter); //$result = $gate->filterByReferrer(5); //foreach ($result as $row) { // echo $row->id . " - " . $row->referrer_id . ' - ' . $row->ip_address . "<br/>"; //} $gate = new VisitsTableGateway($dbAdapter); echo '<h3>Test countryLike</h3>'; $gate = new CountriesTableGateway($dbAdapter); $result = $gate->countryLike('ja'); foreach ($result as $row) { echo $row->CountryName . ' - ' . $row->ISO . "<br/>"; } $gate = new CountriesTableGateway($dbAdapter); echo '<h3>Test countryLike</h3>'; $gate = new BrowserTableGateway($dbAdapter); $result = $gate->visitsByCountryFromContinent(); foreach ($result as $row) { echo $row->Name . $row->Visits . "<br/>"; } // all done close connection $dbAdapter->closeConnection();