Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $connection = mysql_connect('localhost',"sernec","sernec");
- if(!$connection){ die('Not connected : '.mysql_error()); }
- $db_selected = mysql_select_db("SERNEC",$connection);
- if(!$db_selected){ die('Cant use db: '.mysql_error()); }
- $query = "SELECT * FROM SECountiesEntries";
- $result = mysql_query($query);
- if(!$result){
- die('Invalid query: ' .mysql_error());
- }
- while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
- {
- echo $row['state_name'] . ",";
- echo $row['county_name'] . ",";
- echo $row['fips'] . ",";
- echo $row['count'] . ",";
- echo $row['entries'] . ",";
- echo $row['category'] . ",";
- echo $row['latlng'] . "\n";
- }
- mysql_close($connection);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement