dear, everyone...
i need solutions.
i have several tables in a database.
this is tabel_jawab
kd_jwb nis kd_mk jwb1 jwb2 jwb3 jwb4 jwb5
321 654 2 A B A C B
i input them via jsp to mysql table.
i have these table too named tabel_kunci
kd_jwb kd_mk Kjwb1 Kjwb2 Kjwb3 Kjwb4 Kjwb5
321 2 A C C A B
i put them into mysql table via jsp too.(it works well)
i want to compare the with a condition that if the value of "jwb1" in tabel_jwb exactly equals with "Kjwb1" in tabel_kunci then i can give value = 2,5 else value= 0.
do i need another column named "value" to keep 2,5 or 0 ?
will you tell me the query ?
i use
SELECT tabel_siswa.nis,tabel_siswa.nama,tabel_siswa.kelas,tabel_jawab.jwb1,tabel_jawab.jwb2,tabel_jawab.jwb3,tabel_jawab.jwb4,tabel_jawab.jwb5 from tabel_siswa,tabel_jawab where tabel_siswa.nis=tabel_jawab.nis AND tabel_mk.kd_mk=tabel_jawab.kd_mk
but it doesn't work.
please help....
regards
mutawari