From c007ce657dbd50521510105837baf0b83f1ca467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Sun, 15 May 2016 02:54:14 +0200 Subject: [PATCH] Small tweaks to order --- blomzt/main.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/blomzt/main.php b/blomzt/main.php index 404f40a..fe2d3b4 100644 --- a/blomzt/main.php +++ b/blomzt/main.php @@ -33,23 +33,23 @@ if (!TableExists($config["db_table"], $conn)) {
- - + +
@@ -65,8 +65,8 @@ function TableExists($table, $conn) { return mysqli_num_rows($res) > 0; } -function addToTable($lon, $lat, $url, $table, $conn) { - $sql = "INSERT INTO `" . $table . "` (`id`, `location`, `url`, `date_added`) VALUES (NULL, GeomFromText('POINT(" . $lon . $lat . ")',4326), 'test', CURRENT_TIMESTAMP)"; +function addToTable($lat, $lon, $url, $table, $conn) { + $sql = "INSERT INTO `" . $table . "` (`id`, `location`, `url`, `date_added`) VALUES (NULL, GeomFromText('POINT(" . $lon ." " . $lat . ")',4326), 'test', CURRENT_TIMESTAMP)"; //$sql = mysqli_real_escape_string($conn, $sql); printf($sql); $res = mysqli_query($conn, $sql);