19 lines
408 B
PHP
19 lines
408 B
PHP
<?php
|
|
|
|
include_once("config.php");
|
|
|
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
|
|
|
if ($conn->connect_error) {
|
|
die("Connection failed: " . $conn->connect_error);
|
|
}
|
|
|
|
$sql = "CREATE TABLE tracker ( ts TIMESTAMP PRIMARY KEY DEFAULT CURRENT_TIMESTAMP, lat DOUBLE, lon DOUBLE );";
|
|
|
|
if (!mysqli_query($con,$sql)) {
|
|
die('Error: ' . mysqli_error($con));
|
|
}
|
|
|
|
mysqli_close($conn);
|
|
|
|
echo "OK";
|