Assalamu Alaikum Wr.Wb
1. Jelaskan perbedaan rowspan dan colspan pada table?
Jawaban
:
· COLSPAN atribut html atribut
yang digunakan untuk menggabungkan beberapa baris
·
ROWSPAN adalah
atribut html atribut yang digunakan untuk memperlebar atau menggabungkan
beberapa kolom
2. Jelaskan perbedaan Method POST dan GET pada
Form?
Jawaban
:
· Method POST akan mengirimkan data atau nilai langsung ke
action untuk ditampung, tanpa menampilkan pada URL.
· Method GET akan menampilkan data/nilai pada URL, kemudian akan
ditampung oleh action.
3. Berikan Contoh Syntax membuat
table di SQL dan lakukan percobaan DML pada table yang telah ada!
·
Sintax membuat table pada Sql
Ø Create table nama_table
(nama_kolom1 jenis_kolom1 (Panjang data1), nama_kolom2 jenis_kolom2 (panjang
data2),…..)
·
Contoh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database toko; | |
use toko; | |
create table barang (idbarang varchar (10) primary key, namabarang varchar (50), harga int (11), jumlah int (11)); | |
create table pelanggan (idpelanggan varchar (10) primary key, idbarang varchar (10), foreign key (idbarang) references barang (idbarang), namapelanggan varchar (50), alamat varchar (50)); | |
create table penjualan ( idbarang varchar (10), foreign key (idbarang) references barang (idbarang), idpelanggan varchar (10), foreign key (idpelanggan) references pelanggan (idpelanggan), totaltransaksi int(50)); | |
show tables; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into barang values ('b1','buku','5000','3'), | |
('b2','pensil','3000','4'), | |
('b3','pulpen','4000','2'), | |
('b4','tipex','5000','3'); | |
select * from barang; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into pelanggan values ('c1','b1','ilfah','maros'), | |
('c2','b2','yanti','makassar'), | |
('c3','b3','ulfah','makassar'), | |
('c4','b4','nabila','makassar'); | |
select * from pelanggan; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into penjualan values ('b1','c1','15000'), | |
('b2','c2','20000'), | |
('b3','c3','10000'), | |
('b4','c4','15000'); | |
select * from penjualan; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update barang set namabarang='buku gambar' where idbarang='b4'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from penjualan where idbarang='b4'; |
izin copas yah kak, soal nya sama yg dari dosen hehe......
BalasHapus