Skip to main content
Topic: multiple entry in SubForm from Master form using PHPRad (Read 2406 times) previous topic - next topic

multiple entry in SubForm from Master form using PHPRad

Hello @willvin   My SQL data

Suggestion Needed

Tables

table - items
fields - id,quote_no,charge,rate,qty

table-quote
fields - id,quote_no,client_name,remarks
--------------------
Master Form - quote
Sub Form - Items
--------------------

Page Events AfterAdd in quote form
for ($i = 0; $i < count($allmodeldata); $i++) {
    $table_data = array(
        "id" => $id[$i] + $allmodeldata[$i]['id'],
        "charge" => $charge[$i] + $allmodeldata[$i]['charge'],
        "rate" => $rate[$i] + $allmodeldata[$i]['rate'],
        "qty" => $qty[$i] + $allmodeldata[$i]['qty']
    );
  
    $db->where("id", $allmodeldata[$i]['id']);
    $db->update("item", $table_data);
}

----------------------------------------------------

Suggest me Errors message in submitting data .