I had two tables in my database. The table is like below:
Table 1 : MainData
- No_Permohonan (Primary_Key)
- No_Fail
- Tarikh_Permohonan
- Nama_Pemohon
Table 2 : StatusPermohonan
- No_Permohonan (Foriegn Key)
- Mukim
- Tempat
I create a script like below to update the data in table MainData :
<?php
include '../dbase.php';
$query = "UPDATE MainData SET
No_fail = '$No_fail',
Tarikh_Permohonan = '$Tarikh_Permohonan',
Nama_Pemohon = '$Nama_Pemohon'
WHERE No_Permohonan = '$No_Permohonan'";
$result = mysql_db_query($dbname,$query);
:
:
?>
Plz show to me how the script can update automatically field No_Permohonan in table StatusPermohonan under one script..