From 0ca1af7ede249693d309a2cd4bc92ada8c949c75 Mon Sep 17 00:00:00 2001 From: pancaa Date: Wed, 10 Jun 2026 18:40:42 +0700 Subject: [PATCH] Update Project 1 database connection --- 01/koneksi.php | 10 ++++++- database/webgis1.sql | 71 ++++++++++++++------------------------------ 2 files changed, 31 insertions(+), 50 deletions(-) diff --git a/01/koneksi.php b/01/koneksi.php index d99b547..1811c67 100644 --- a/01/koneksi.php +++ b/01/koneksi.php @@ -1,7 +1,15 @@ connect_error) { die("Koneksi gagal: " . $conn->connect_error); } + +$conn->set_charset("utf8mb4"); ?> \ No newline at end of file diff --git a/database/webgis1.sql b/database/webgis1.sql index 2b69e4b..58a6c0e 100644 --- a/database/webgis1.sql +++ b/database/webgis1.sql @@ -1,51 +1,24 @@ --- phpMyAdmin SQL Dump --- version 5.2.1 --- https://www.phpmyadmin.net/ --- --- Host: 127.0.0.1 --- Generation Time: Jun 10, 2026 at 07:39 AM --- Server version: 10.4.32-MariaDB --- PHP Version: 8.0.30 +CREATE TABLE lokasi ( + id INT AUTO_INCREMENT PRIMARY KEY, + nama_spbu VARCHAR(255) NOT NULL, + no_wa VARCHAR(50), + status VARCHAR(100), + latitude DOUBLE NOT NULL, + longitude DOUBLE NOT NULL +); -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; +CREATE TABLE jalan ( + id INT AUTO_INCREMENT PRIMARY KEY, + nama_jalan VARCHAR(255) NOT NULL, + status VARCHAR(100), + panjang DOUBLE DEFAULT 0, + geom LONGTEXT NOT NULL +); - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Database: `webgis1` --- - --- -------------------------------------------------------- - --- --- Table structure for table `jalan` --- --- Error reading structure for table webgis1.jalan: #1932 - Table 'webgis1.jalan' doesn't exist in engine --- Error reading data for table webgis1.jalan: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `webgis1`.`jalan`' at line 1 - --- -------------------------------------------------------- - --- --- Table structure for table `kavling` --- --- Error reading structure for table webgis1.kavling: #1932 - Table 'webgis1.kavling' doesn't exist in engine --- Error reading data for table webgis1.kavling: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `webgis1`.`kavling`' at line 1 - --- -------------------------------------------------------- - --- --- Table structure for table `lokasi` --- --- Error reading structure for table webgis1.lokasi: #1932 - Table 'webgis1.lokasi' doesn't exist in engine --- Error reading data for table webgis1.lokasi: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `webgis1`.`lokasi`' at line 1 -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +CREATE TABLE kavling ( + id INT AUTO_INCREMENT PRIMARY KEY, + pemilik VARCHAR(255) NOT NULL, + status VARCHAR(100), + luas DOUBLE DEFAULT 0, + geom LONGTEXT NOT NULL +); \ No newline at end of file