<?php
/**
* Radial Search Database setup file
*
* @author Daniel Sentker tracid2008 at gmail dot com
* @copyright (c) 2011 Daniel Sentker
* @package RadialSearch
*/
function databasesetup(PDO $conn, $file) {
$conn->query('SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";');
$conn->query('CREATE TABLE IF NOT EXISTS `zip_coordinates` (
`zc_id` int(11) NOT NULL AUTO_INCREMENT,
`zc_loc_id` int(11) NOT NULL,
`zc_zip` varchar(10) NOT NULL,
`zc_location_name` varchar(255) NOT NULL,
`zc_lat` double NOT NULL,
`zc_lon` double NOT NULL,
PRIMARY KEY (`zc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17172;');
$query = file_get_contents($file);
$conn->query($query);
}
?>
|