for($i=1; $i<=($jumlah_row_tabel_atas+1); $i++)
{
$satuan = $_POST['PP_row_'.$i.'_satuan'];
$word_2[$i]="SELECT id_unit FROM manage_unit WHERE name_unit = '$satuan'";
$q[$i] = mysql_query($word_2[$i]);
$data_X = mysql_fetch_array($q[$i]);
$id_unit = $data_X['id_unit'];
$harga_1 = $_POST['PP_row_'.$i.'_harga_1'];
$harga_2 = $_POST['PP_row_'.$i.'_harga_2'];
$harga_3 = $_POST['PP_row_'.$i.'_harga_3'];
$id_drug = $_POST['id_drug'];
$value = $value_array[$i];
$word="INSERT INTO relation_mu_and_unit (id_drug, id_unit, priority, value, harga1, harga2, harga3, last_edit) VALUES
( $id_drug,$id_unit, $i, $value, $harga_1, $harga_2, $harga_3, NOW() );";
mysqli_multi_query($word);
}
andika.kurniawan.121 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.