Menampilkan Database Tabel Guru ke web
Langkah - langkah :
1.Buka CMD :
Microsoft Windows [Version 10.0.26100.6901]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Bahtra-12>cd c://xampparya/mysql/bin
c:\xampparya\mysql\bin>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.4.32-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use db_smk;
Database changed
MariaDB [db_smk]> create table tb_guru(
-> nip int(25)not null,
-> nama_guru varchar(200)not null,
-> jenis_kelamin varchar(15)not null,
-> tempat_lahir varchar(50)not null,
-> tanggal_lahir date,
-> nama_ibukandung varchar(100)not null,
-> primary key(nip));
Query OK, 0 rows affected (0.023 sec)
MariaDB [db_smk]> INSERT INTO tb_guru VALUES(1001,'Agri','Laki-laki','Sumedang','1991-08-17','Anah');
Query OK, 1 row affected (0.049 sec)
MariaDB [db_smk]> select * from tb_guru;
+------+-----------+---------------+--------------+---------------+-----------------+
| nip | nama_guru | jenis_kelamin | tempat_lahir | tanggal_lahir | nama_ibukandung |
+------+-----------+---------------+--------------+---------------+-----------------+
| 1001 | Agri | Laki-laki | Sumedang | 1991-08-17 | Anah |
+------+-----------+---------------+--------------+---------------+-----------------+
1 row in set (0.001 sec)
2.Buat Kode PHP nya :
3.Outputnya :
Komentar
Posting Komentar