Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/reshajt1/public_html/wp-includes/comment-template.php on line 1747

Deprecated: Creation of dynamic property Disable_Comments::$is_CLI is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 59

Deprecated: Creation of dynamic property Disable_Comments::$sitewide_settings is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 61

Deprecated: Creation of dynamic property Yoast\WP\SEO\Main::$helpers is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 65

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block-type.php on line 391

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block-type.php on line 391

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home/reshajt1/public_html/wp-includes/pomo/translations.php on line 292

Deprecated: Implicit conversion from float 1789179086.981072 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home/reshajt1/public_html/wp-includes/pomo/translations.php on line 292

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$disabled_wp_cron is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 69

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$enable_self_cron is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 70

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$require_optin is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 74

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$include_goodbye_form is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 75

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$marketing is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 76

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$options is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 77

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$item_id is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 78

Deprecated: Creation of dynamic property Disable_Comments::$tracker is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 150

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$notice_options is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 657

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Warning: Cannot modify header information - headers already sent by (output started at /home/reshajt1/public_html/wp-includes/wp-db.php:760) in /home/reshajt1/public_html/wp-includes/feed-rss2.php on line 8
<br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Surfaces\Classes_Surface::$container is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php</b> on line <b>20</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Main::$classes is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/lib/abstract-main.php</b> on line <b>65</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$page_type is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>43</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$pagination is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/archive-adjacent-trait.php</b> on line <b>29</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$source is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>64</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$title is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>64</b><br /> mysql Archives - ReshaJTama https://reshajtama.my.id Share Anything Sat, 11 May 2024 17:06:38 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.14 https://reshajtama.my.id/wp-content/uploads/2022/05/cropped-cropped-Logo-32x32.png mysql Archives - ReshaJTama https://reshajtama.my.id 32 32 Cara Membuat CRUD PHP : Part 01 Membuat Database https://reshajtama.my.id/cara-membuat-crud-php-part-01-membuat-database/ Sat, 23 Jul 2022 05:37:02 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383
https://reshajtama.my.id/?p=456 Deprecated: Implicit conversion from float 1789179087.040118 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.040419 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Selamat datang kembali teman teman di web saya, kali ini saya akan membagikan tutorial CRUD ( Create Read Update Delete ) pada bahasa pemrogran PHP. Teman teman yg baru belajar dapat mengikuti tutorial ini. CRUD adalah suatu metode yang sangat umum dipakai pada suatu web. terutama pada bahasa pemrograman php. Pengertian CRUD adalah kepanjangan dari …

The post Cara Membuat CRUD PHP : Part 01 Membuat Database appeared first on ReshaJTama.

]]>

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Implicit conversion from float 1789179087.042844 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.042936 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93
Selamat datang kembali teman teman di web saya, kali ini saya akan membagikan tutorial CRUD ( Create Read Update Delete ) pada bahasa pemrogran PHP. Teman teman yg baru belajar dapat mengikuti tutorial ini. CRUD adalah suatu metode yang sangat umum dipakai pada suatu web. terutama pada bahasa pemrograman php.

Pengertian CRUD adalah kepanjangan dari Create, Read, Update dan Delete. Keempat istilah ini merupakan perintah atau query yang digunakan programmer untuk melakukan aksi melalui database relasional.

Sebelum membuat CRUD, kita harus membuat sebuah database yang akan dijadikan sebagai penyimpanan nya nanti. saya menggunakan database mysql disini. Kalian bisa menginstall Paket XAMPP, karena program XAMPP telah menyediakan paket lengkap nya.

Untuk Program XAMPP anda dapat mendownload nya langsung di website resminya :

Setelah di download & di install langsung di jalankan saja, jika tidak bisa menginstall dan menjalan kannya. Temen temen bisa melihat artikel saya sebelum nya di sini :

Install dan menjalankan Xampp

Oke kita langsung saja membuat website crud nya :

  • Masuk ke mysql dengan cara mengetik pada shell xampp
mysql -u root -p
  • Kemudian buat database & table belajar_crud dengan perintah sebagai berikut
#untuk membuat database#
CREATE DATABASE belajar_crud 

#untuk masuk ke database belajar crud#
USE belajar_crud 

#untuk membuat table#
CREATE TABLE `mahasiswa` (
  `nim` INT(11) NOT NULL AUTO_INCREMENT,
  `nama` VARCHAR(250) NOT NULL,
  `kelas` VARCHAR(250) NOT NULL,
  `keterangan` VARCHAR(500) NOT NULL,
  PRIMARY KEY (`nim`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4
  • Buat Folder pada directory default dari xampp di “C:\Xampp\htdocs\belajar_crud”
  • Kemudian buat file dengan nama “koneksi.php” pada folder tersebut
  • Kemudian isi file tersebut dengan kode seperti ini
<?php 
	$host = "localhost";
	$user = "root" ;
	$pass = "";
	$db   = "belajar_crud";

	$connect = mysqli_connect($host,$user,$pass,$db);

	if (!$connect) {
		echo "Gagal Koneksi Database";
	}
	
?>
  • Kemudian buat File “Index.php” di dalam folder tadi
  • Kemudian masukan kode berikut
<?php

	include "koneksi.php";

	$query = "select * from mahasiswa";
	$query = mysqli_query($connect,$query);

?>


<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Data Mahasiswa</title>
</head>
<body>
	<table border=1>
		<tr>
			<td>#</td>
			<td>NIM</td>
			<td>Nama</td>
			<td>Kelas</td>
			<td>Keterangan</td>
		</tr>
		<?php
			$no = 1 ;
			while($data = mysqli_fetch_array($query)){
				echo "<tr>";
				echo "<td>".$no."</td>";
				echo "<td>".$data['nim']."</td>";
				echo "<td>".$data['nama']."</td>";
				echo "<td>".$data['kelas']."</td>";
				echo "<td>".$data['keterangan']."</td>";
				echo "</tr>";
				$no++;
			}

		?>
	</table>

</body>
</html>
  • Kemudian coba insert data ke table, dan cek apakah muncul atau tidak datanya di web tersebut
  • Maka hasilnya akan seperti Berikut

Gampang kan, klo coba coba pasti bisa. kalau ada pertanyaan atau saran bisa langsun komen di bawah saja. untuk selanjutnya kita akan membuat sebuat crete, update dan delete data nya. untuk create nya nanti kita hanya perlu menambahkan file pada folder belajar_crud

The post Cara Membuat CRUD PHP : Part 01 Membuat Database appeared first on ReshaJTama.

]]>
Cara membuat Performa dan mengamankan MYSQL https://reshajtama.my.id/cara-membuat-performa-dan-mengamankan-mysql/ Wed, 26 Feb 2020 05:29:56 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383
http://reshajtama.my.id/?p=175 Deprecated: Implicit conversion from float 1789179087.045341 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.045433 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Selamat datang di blog saya, kali ini saya akan membagikan tutorial bagaimana cara untuk mengamankan MySql dan mempercepat performa nya. Tentunya jika anda memiliki website atau program yang selalu menarik query dari mysql dengan user yang banyak, pasti nya anda harus membuat mysql berjalan dengan optimal. Bagaimana caranya, berikut adalah tutorial nya : Mengubah port …

The post Cara membuat Performa dan mengamankan MYSQL appeared first on ReshaJTama.

]]>

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Implicit conversion from float 1789179087.048026 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.048115 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93
Selamat datang di blog saya, kali ini saya akan membagikan tutorial bagaimana cara untuk mengamankan MySql dan mempercepat performa nya. Tentunya jika anda memiliki website atau program yang selalu menarik query dari mysql dengan user yang banyak, pasti nya anda harus membuat mysql berjalan dengan optimal. Bagaimana caranya, berikut adalah tutorial nya :

  1. Mengubah port mysql

Seperti yang kita ketahui, mysql menggunakan port 3306 sebagai default port nya. Kita bisa mengubah default port nya sesuai dengan yang kita mau. Berikut adalah caranya :

Cari file my.ini mysql

  • Note : Pada dasarnya file my.ini pada mysql di linux dan windows itu sama, hanya saja tempat nya yang berbeda.
  • Buka my.ini pada config di xampp control panel
  • Disini saya mengganti port nya menjadi 3307
  • Binding IP address

Terkadang orang sering lupa dengan settingan ini ?, walaupun sepele tetapi sangat fatal jika kita lupa mensetting nya. Dengan binding Ip address ini kita dapat mensetting siapa saja yang dapat melakukan akses terhadap mysql. Untuk settingan nya seperti ini :

  • Masih di file My.ini yang seperti tadi
  • Kemudian cari baris sepert berikut :
  • Disini saya hanya memberi akses pada segment 192.168.1.0/24 yang hanya dapat mengakses Mysql tersebut
  • Membuat Satu File per Table

Untuk apa settingan berikut ini ?, Settingan ini membuat file file kecil dalam setiap table yang anda buat pada mysql. Sehingga apabila terjadi rusak pada salah satu table, tidak merambat ke table lain. Berikut settingannya :

  • Buka pada settingan My.ini tadi
  • Masukan script berikut pada settingan mysql nya
  • Memberikan RAM yang besar pada Mysql

Pada settingan ini pastikan anda memiliki RAM minimal 4 GB pada PC yang terinstall mysql server. Karena pada settingan ini akan mengizinkan Mysql untuk mengakses RAM anda,  saya saran kan untuk settingan ini jangan memberikan Akses lebih dari 2 GB pada Mysql, karena saya pernah melakukan settingan lebih dari 2 GB dan Mysql tidak mau berjalan, tetapi jika anda bisa mengoprek nya agar bisa menjadi lebih optimal terserah anda, oke langsung ke caranya saja :

  • Masih di File My.ini yang tadi
  • Kemudian cari baris berikut pada my.ini, disini saya mensetting 2GB

Setelah melakukan optimasi, jangan lupa untuk merestart Mysql Sevice nya, kemudian silahkan bandingkan bagaimana performanya. Semoga bermanfaat dan jangan lupa untuk menshare nya ke teman teman anda. Terima kasih

The post Cara membuat Performa dan mengamankan MYSQL appeared first on ReshaJTama.

]]>
Python – Import XLSX to SQL file https://reshajtama.my.id/python-import-xlsx-to-sql-file/ Wed, 01 May 2019 06:54:21 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383
http://reshajtama.my.id/?p=6 Deprecated: Implicit conversion from float 1789179087.050502 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.0506 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Selamat datang di blog saya. Kali ini saya akan membagikan tutorial bagaimana cara untuk import file xlsx untuk masuk ke query sql kita. kita membutuhkan 2 module yang di butuhkan untuk membuat script tersebut yaitu : xlrd mysqldb Disini saya mempunyai sebuah file dengan format xls dengan nama “Test.xls”. Berikut isi file tersebut : Jangan …

The post Python – Import XLSX to SQL file appeared first on ReshaJTama.

]]>

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Implicit conversion from float 1789179087.052865 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789179087.052961 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93
Selamat datang di blog saya. Kali ini saya akan membagikan tutorial bagaimana cara untuk import file xlsx untuk masuk ke query sql kita. kita membutuhkan 2 module yang di butuhkan untuk membuat script tersebut yaitu :

  • xlrd
  • mysqldb

Disini saya mempunyai sebuah file dengan format xls dengan nama “Test.xls”. Berikut isi file tersebut :

Jangan lupa membuat Database dengan Table yang sesuai dengan file nya. Seperti ini :

Nah sekarang kita buat script untuk bisa konek ke database kita. disini saya menggunakan mysql sebagai databasenya, jadi saya menggunakan module MySQLdb sebagai connector nya. jika anda menggunakan database lain, anda bisa mencari module database connector nya.

import MySQLdb as sql

db = sql.connect(host="localhost", user="root",passwd="123", db="excel")

curs = db.cursor()

query = """ INSERT INTO belajar(id,nama,kelas,alamat) VALUES (%s,%s,%s,%s)"""

Kemudian untuk mengimport file xls nya kalian harus menambahkan module xlrd. xlrd hanya bisa menggunakan file dengan exstensi ‘.xls’ saja. Anda tidak bisa import file seperti ‘.xlsx’,’.csv’ atau file excel lainnya.

import xlrd

book = xlrd.open_workbook("Test.xls") #nama file xls nya
sheet = open.sheet_by_name('Test') #nama sheet excel

Nah, tinggal kita gabungin terus pake looping buat masukin datanya. Untuk full script nya bisa di lihat disini atau mendownload nya via github :

import xlrd
import MySQLdb as sql

# SQL
db = sql.connect(host="localhost", user="root",passwd="toor", db="excel")

curs = db.cursor()

query = """ INSERT INTO belajar(id,nama,kelas,alamat) VALUES (%s,%s,%s,%s)"""

# XLS File
book = xlrd.open_workbook("Test.xls") #nama file xls nya
sheet = book.sheet_by_name('Test') #nama sheet excel

#Execute

for n in range(1,sheet.nrows):
		id		= sheet.cell(n,0).value
		nama		= sheet.cell(n,1).value
		kelas		= sheet.cell(n,2).value
		alamat		= sheet.cell(n,3).value

		values = (id,nama,kelas,alamat)

		curs.execute(query,values)

curs.close
db.commit()

print("Anda telah berhasil Import !!!")

Silahkan jika anda ingin mendownload source Code nya. Bisa di ambil di akun saya.

https://github.com/ReshaJTama/xlstosql

Anda dapat mengunjungi source tutorial ini di

https://mherman.org/blog/import-data-from-excel-into-mysql-using-python/

The post Python – Import XLSX to SQL file appeared first on ReshaJTama.

]]>