Thanks for all previous phphelp.
I am attempting to add another calculation to this successfully working code,
to generate a number that is half of the User amount ($up_amount = $video_cost_new). Here’s the current code:
$db->startTransaction();
$inserted_records = 0;
foreach ($id_array as $id){
$video_id = (int)PT_Secure($id);
// get video data
$video = $db->where('id', $id)->getOne(T_VIDEOS);
$video_cost_new = $video->rent_price?$video->rent_price:$video_cost;
// credit the User 50% of the video cost
$up_amount = $video_cost_new *0.50;
// add data to table
/////////////////////////etc.///////////////////////////////////////////////
]);
So, I’m asking if adding this code would be the correct code to accomplish generating a number that is half of the User amount:
$money_amount = $up_amount *0.50;
I look forward to any guidance.