![]() |
Tandy 9/6/2019 |
Whats wrong with my code im trying copy this to another table i have 2-3 selector row but when click the button, it only copied 1 record only. Any help please? $tblItems = $dal->Table('transaction_detail'); while($data = $button->getNextSelectedRecord()) { $tblItems->Value["TDID"]='TDID'.(date('ymdhis',strtotime('+8 Hours'))+1); $tblItems->Value['TID']='TRANS'.date('ymdhis',strtotime('+8 Hours')); $tblItems->Value['BookID']=$data['BookID']; $tblItems->Value['BookTitle']=$data['Book_Title']; $tblItems->Value['UserID']=$data['UserID']; $tblItems->Value['UserName']=$data['UserID']; $tblItems->Add(); }
|
![]() |
Admin 9/6/2019 |
This code looks good to me. Check if there are any error behind the scene: |
![]() |
mic'',) author 9/6/2019 |
Here is mine that works out great. I know yours is a button but I have it in the event after record added // Insert a new record into truck_maintenance_logs table - Start $data = array(); $data["truck_id"] = $values["truck_id"]; $data["truck_number"] = $values["truck_number"]; $data["email"] = $values["email"]; $data["service"] = $values["service"]; $data["date"] = $values["date"]; $data["done"] = $values["done"]; $data["intervals"] = $values["intervals"]; $data["next"] = $values["next"]; $data["mileage"] = $values["mileage"]; $data["due"] = $values["due"]; DB::Insert("truck_maintenance_logs", $data ); // Insert a new record into truck_maintenance_logs table - End Hope that helpsJames
|
![]() |
Admin 9/7/2019 |
This code looks good to me. Check if there are any error behind the scene: |
![]() |
mic'',) author 9/7/2019 |
Thank you much problem solved! |