PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Daniel S  >  Radial Search  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: How to use the file
Class: Radial Search
Retrieve for German cities in a given distance
Author: By
Last change:
Date: 11 years ago
Size: 725 bytes


Class file image Download

 * turn on error reporting
ini_set('display_errors', 1);


// create a pdo connection
$dbh = new \PDO('mysql:host=localhost;dbname=qsnip', 'root', '');

// setup the pdo connection
$dbh->exec('SET NAMES utf8');

 * Uncomment if the required table
 * is not installed yet

#require realpath('radialsearch/databasesetup.php');
#databasesetup($dbh, realpath('radialsearch/setup.sql')); exit('Setup success.');

$search = new RadialSearch($dbh);

$result = $search->getResult();



For more information send a message to info at phpclasses dot org.