delete from 5 table
help me please, i've a homeworks
i've 5 tables
table1
++++++++++++++++++++++++++
+ id_kategori + kategori +
++++++++++++++++++++++++++
table2
++++++++++++++++++++++++++++++++++
+ id_jenis + id_kategori + jenis +
++++++++++++++++++++++++++++++++++
table3
+++++++++++++++++++++++++++++
+ id_nama + id_jenis + nama +
+++++++++++++++++++++++++++++
table4
++++++++++++++++++++++++++++++++
+ id_detail + id_nama + detail +
++++++++++++++++++++++++++++++++
table5
++++++++++++++++++++++++++++++++++++++++
+ id_detailnew + id_detail + detailnew +
++++++++++++++++++++++++++++++++++++++++
and when i delete a kategori, then all related data under it deleted too.
i've try :
$hapuskan=mysql_query("delete kategori,jenis,nama_barang,spesifikasi,detail_spesifikasi FROM kategori LEFT JOIN jenis ON kategori.ID_KATEGORI = jenis.ID_KATEGORI LEFT JOIN nama_barang ON jenis.ID_JENIS = nama_barang.ID_JENIS LEFT JOIN spesifikasi ON nama_barang.ID_NAMA = spesifikasi.ID_NAMALEFT JOIN detail_spesifikasi ON spesifikasi.ID_SPEK = detail_spesifikasi.ID_SPEK where ID_KATEGORI=$whate");
and not working x_x
Subject
Written By
Posted
delete from 5 table
February 21, 2014 09:24AM
February 21, 2014 11:34AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.